local Part = script.Parent
Part.Touched:connect(function(HIT)
local h = HIT.Parent:FindFirstChild("Humanoid")
if h then
local Player = game.Players:GetPlayerFromCharacter(HIT.Parent)
Player.PlayerGui.Placechanger.Door1.Visible = true
end
end)
script.Parent.Touched:connect(onTouched)
✓ ANSWER ACCEPTED
my Gui only shows once if touched! Any help? i need a resolution for my script
2 answers
✓ Accepted answer
1: Use a code block
2: Provide the output (F9 for ingame output)
3: you do not check if the player exists, meaning anything which touches it whose parent is a humanoid will error the script.
MayB the Gui deletes itself...
2 comments
0
Jeah how do i fix that so if i touch it again it will show up again
0
You should use a comment for this, not a answer.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Use a codeblock please.
there u go
in the Output it says after i touched it once and close it and touch it again : Door 1 is not a valid member of ScreenGui