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

This local script is suppose to make the gui appear but it wont work. Help?

function onPlayerEntered(player)
repeat wait () until player.Character
wait(46)
script.Parent.Visible = true
game.Workspace.KingBedroomDoor.locked.Value = false
script.Parent.Main.Disabled = false
end
game.Players.PlayerAdded:connect(onPlayerEntered)

It just won't work.

1 comment

0

is it in a local script?

1 answer

A local script will run directly when the player enters and loads.

game.Players.LocalPlayer:WaitForChild("PlayerGui") --Make sure player is loaded
wait(46)
script.Parent.Visible = true
game.Workspace.KingBedroomDoor.locked.Value = false
script.Parent.Main.Disabled = false

4 comments

0

Thanks, I'll try it later.

0

The "end" at the end is a accident ?

0

Didn't work but, thanks.

0

Edited to remove the end. Do you have FilteringEnabled enabled or no?

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