mirror of
https://github.com/AmberGraceRblx/luau-promise.git
synced 2025-04-24 15:50:01 +00:00
Configure HttpEnabled when installing
When using the command bar script, it first stores the current setting of HttpEnabled, sets it to true, adds the module, and sets it back to the previous value. This removes the step requiring the user to configure HttpEnabled within the Game Settings window.
This commit is contained in:
parent
948331d19b
commit
25ef780336
1 changed files with 12 additions and 5 deletions
|
@ -6,11 +6,18 @@ title: Installation
|
|||
|
||||
### Method 1 - Quick and Dirty
|
||||
|
||||
1. Make sure HTTP requests are enabled in Game Settings
|
||||
2. In Roblox Studio, select the folder where you keep your third party modules / utilities.
|
||||
3. Run this in the command bar:
|
||||
1. In Roblox Studio, select the folder where you keep your third party modules / utilities.
|
||||
2. Run this in the command bar:
|
||||
|
||||
<textarea readonly style="width: 100%" onclick="this.select()">local m = Instance.new("ModuleScript") m.Parent = game:GetService("Selection"):Get()[1] or game:GetService("ServerScriptService") m.Name = "Promise" m.Source = game:GetService("HttpService"):GetAsync("https://raw.githubusercontent.com/evaera/roblox-lua-promise/master/lib/init.lua") game:GetService("Selection"):Set({m})</textarea>
|
||||
<textarea readonly style="width: 100%" onclick="this.select()">local Http = game:GetService("HttpService")
|
||||
local HttpEnabled = Http.HttpEnabled
|
||||
Http.HttpEnabled = true
|
||||
local m = Instance.new("ModuleScript")
|
||||
m.Parent = game:GetService("Selection"):Get()[1] or game:GetService("ServerScriptService")
|
||||
m.Name = "Promise"
|
||||
m.Source = Http:GetAsync("https://raw.githubusercontent.com/evaera/roblox-lua-promise/master/lib/init.lua")
|
||||
game:GetService("Selection"):Set({m})
|
||||
Http.HttpEnabled = HttpEnabled</textarea>
|
||||
|
||||
### Method 2 - Manual
|
||||
|
||||
|
@ -31,4 +38,4 @@ Using a package manager? The repository has a [`rotriever.toml`](https://github.
|
|||
|
||||
## Next
|
||||
|
||||
Now, check out the [API reference](/lib)!
|
||||
Now, check out the [API reference](/lib)!
|
||||
|
|
Loading…
Reference in a new issue