How do i make a gui only for the player

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)
1 Like

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?

You would send a remote event to the client

And what AwakenedElemental said, make a gui in playergui.

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)

I’m sure this will work.

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)