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

Touched and TouchEnded event not working. Why?

Asked by 9 years ago

This script isn't doing anything. It is a regular script inside a part in workspace. NOTHING IN OUTPUT!

script.Parent.Touched:connect(function(part)
    local h = part.Parent:FindFirstChild("Humanoid")
    if h then
        script.Parent.Parent.Barrier1.CanCollide = true
    end
end)

script.Parent.TouchEnded:connect(function(part)
    local h = part.Parent:FindFirstChild("Humanoid")
    if h then
        workspace.GuiText.Game.Disabled = false
        script.Parent.CanCollide = true
        script.Parent.SelectionBox.Transparency = 0
        script.Parent.Transparency = 0
        script.Parent.Script:remove()
        script:remove()
    end
end)
0
What do you want to do with the script? I think I see the error but it depends on the scripts function. BlackJPI 2658 — 9y
0
What is the error? EzraNehemiah_TF2 3552 — 9y
0
workspace.GuiText.Game is a script. EzraNehemiah_TF2 3552 — 9y

Answer this question