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

My spectate gui isn't working, while it should work fine, why?

Asked by 8 years ago

I used these lines script it: I get the error on line 9, _G.gameplayers is defined in another script

01cam = game.Workspace.CurrentCamera
02local button = script.Parent:WaitForChild('Button')
03local bar = script.Parent:WaitForChild('Bar')
04local title = bar.Title
05local prev = bar.Previous
06local nextone = bar.Next
07 
08function get()
09    for _, v in pairs(_G.gameplayers()) do
10        if v.Name == title.Text then
11            return(_)
12        end
13    end
14end
15 
View all 67 lines...

Click this to see how my studio looks like

0
If there are mistakes like .Parent instead of script.Parent it's because of the website, I wrote that correctly :P VladimVladim 78 — 8y
0
What error are you getting? Pyrondon 2089 — 8y
0
Try adding a: repeat wait() until _G.gameplayers() ~= nil antonio6643 426 — 8y
0
In what part of the script do I need to put that? VladimVladim 78 — 8y

Answer this question