Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Whats wrong with my Guest Informer script?

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

✓ Accepted answer

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.

3 comments

0

Wow, its working now, thanks man!

0

No problem.

0

You don't need to wait for the player to load though; the script wont fire until the player has been loaded. lol

This discussion is preserved as it was. New answers, comments, and votes are closed.