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

Whats wrong with my Guest Informer script?

Asked by 10 years ago

Something in it isn't working, but I don't know whats wrong, and there are no Errors in the Output (Neither in-game or Solo mode), what did I do wrong? Here is the script;

repeat wait(0)until game:FindService("Players")and game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("Humanoid")and game.Players.LocalPlayer:GetMouse()and script.Parent and script.Parent:FindFirstChild("Frame")and script.Parent.Frame:FindFirstChild("TextLabel")
if game.Players.LocalPlayer.Name:sub(1,6)=="Guest "then
script.Parent.Frame.Visible=true
wait(15)
script.Parent:Destroy()
else
script.Parent:Destroy()
end

1 answer

Log in to vote
1
Answered by 10 years ago

Try getting rid of some of the ands. You don't need to wait for all of those things, just wait until the Player is loaded.

local Player = game.Players.LocalPlayer
repeat wait() until Player

That's all you need, you don't need to wait for all of the rest to load. I hope this fixes your problem, if not then comment what your output tells you.

0
Wow, its working now, thanks man! TheeDeathCaster 2368 — 10y
0
No problem. SlickPwner 534 — 10y
0
You don't need to wait for the player to load though; the script wont fire until the player has been loaded. lol TheeDeathCaster 2368 — 7y
Ad

Answer this question