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

my Gui only shows once if touched! Any help? i need a resolution for my script [closed]

Asked by 7 years ago
Edited 7 years ago
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)
0
Use a codeblock please. Async_io 908 — 7y
0
there u go Paintertable 171 — 7y
0
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 Paintertable 171 — 7y

Closed as Not Constructive by Async_io, TheHospitalDev, and InfinitivePixelsJr

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
2
Answered by 7 years ago

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.

Ad
Log in to vote
-2
Answered by 7 years ago

MayB the Gui deletes itself...

0
Jeah how do i fix that so if i touch it again it will show up again Paintertable 171 — 7y
0
You should use a comment for this, not a answer. InfinitivePixelsJr 542 — 7y