So I've been having lots of difficulties with my script. I looked at the tutorials on how to use RemoteEvent but it just confused me as I'm a new game scripter and maker so I removed it all so I could (Hopefully) get it to work with some help. So here's the code, hopefully one of you great people can edit this to make it compatible or try and walk me through what needs to be done.
local id = 996728468 game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:Connect(function(character) if game:GetService("GamePassService"):PlayerHasPass(player, id) then character.Humanoid.WalkSpeed = 75 player.PlayerGui:WaitForChild("NoticeGUI").Note.Visible = true player.PlayerGui:WaitForChild("ScreenGui").Run.Visible = true player.PlayerGui:WaitForChild("ScreenGui").Walk.Visible = true player.PlayerGui:WaitForChild("ScreenGui").TextButton.Visible = false else --Awaiting use end end) end)
For further info, the problem is when FilteringEnabled is on, the output says "Infinite yield possible on player.PlayerGui:WaitForChild("NoticeGUI")"
Thanks for your time.
http://wiki.roblox.com/index.php?title=API:Class/RemoteEvent https://www.youtube.com/watch?v=C0qQ4lDa3t0
This should be a server script.
The server CANNOT see GUI's inside of players, as they are on the client. This means that your :WaitForChild()
's will never find anything as they cannot see them.