Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[StarterGui] Local Script are working in studio but not in game, why?

Asked by 7 years ago

This works in studio but not in game, how do I fix this? I have the same script in workspace and it works. This script is placed in startergui.

01local http = game:GetService("HttpService")
02local Trello = "lI46otVc"
03local Key = "secret" -- I removed the key for safety
04local Token = "secret" -- I removed the token for safety
05local get = http:GetAsync('https://api.trello.com/1/lists/5af9b06b147bcf8c3833dd60/cards/?key='..Key..'&token='..Token,true)
06local tab = http:JSONDecode(get)
07local de = false
08 
09while true do
10    for _,h in pairs(tab) do
11        if de == true then
12            wait(1)
13        elseif de == false then
14            de = true
15            wait(1)
View all 25 lines...
0
i know the answer to your question RodrigatorOP 172 — 7y
3
Httpservice can only be accessed by serverscripts, you should use remote events User#20388 0 — 7y
0
How do I use remote events? Are you able to help me? GroovyFhish 8 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

Depends on what you are trying to use it for. If you're trying to make it access a server file use a FireServer() function

1-- LocalScript
2 
3local ReplicatedStorage = game:GetService("ReplicatedStorage")
4local createPartEvent = ReplicatedStorage:WaitForChild("CreatePartEvent")
5 
6createPartEvent:FireServer()

Not my script this was taken from the wiki but can be made by anyone

Ad

Answer this question