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

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

Asked by 6 years ago
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.

0
is it in a local script? GingeyLol 338 — 6y

1 answer

Log in to vote
0
Answered by
dirk2999 103
6 years ago
Edited 6 years ago

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
0
Thanks, I'll try it later. JackThePro202 -2 — 6y
0
The "end" at the end is a accident ? JackThePro202 -2 — 6y
0
Didn't work but, thanks. JackThePro202 -2 — 6y
0
Edited to remove the end. Do you have FilteringEnabled enabled or no? dirk2999 103 — 6y
Ad

Answer this question