local CoolBoy = { 3179316 ,31862508, } local Player = players.LocalPlayer local Gui = Player.PlayerGui.SliderGui local found = false for i =1, #CoolBoy do if CoolBoy[i]== Player.UserId then Gui.Visible = true found = true else if not found then Gui.Visible = false end end end
Notes: This is all in a LocalScript inside of StarterPlayer>StarterPlayerScripts, the GUI is called SliderGui and is in StarterGui. Alright thanks if you can help.
is players
defined? If it isn't, there's your problem.
Another thing that will probably help is replacing line 6 with:
local Gui = Player:WaitForChild("PlayerGui"):WaitForChild("SliderGui")