I am trying to make a gui show up when a player walks over it when the player walks over the part the gui shows up to the whole server
My script:
workspace.GameDoorHolder.LevelDoor.Head.Touched:Connect(function(hit)
if hit then
script.Parent.TeleportWarning.Background.Visible = true
wait(5)
script.Parent.TeleportWarning.Background.Visible = false
end
end)
I would suggest using playergui, I guess, and I think your script works for any player right now if that’s what you want.
Also, is your script not working? Is that what you are trying to say?
workspace.GameDoorHolder.LevelDoor.Head.Touched:Connect(function(hit)
if hit then
if hit.Parent.Name = game.Players.LocalPlayer.Name then
script.Parent.TeleportWarning.Background.Visible = true
wait(5)
script.Parent.TeleportWarning.Background.Visible = false
end
end
end)
No you will be trying to index a player with the name of “Name” so it will error edit: nevermind but try using getplayerfromcharacter (i won’t send it because I’m on mobile but you can find it in the developer hub)