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

Touched event does not trigger the outcome. How to fix?

Asked by 4 years ago

So I am trying to make it when you touch a certain part, it triggers and goes into the workspace, it opens a model and it goes to a decal and changes the transparency when it is touched by the players Humanoid.

When I go to touch the part that activates the outcome, nothing happens.

Here is the script:

script.Parent.Touched:Connect(function(hit)
    local h = hit.Parent:FindFirstChild('Humanoid')
    if h then
        game.Workspace.Bob.Head.Decal.Transparency = 0
    end
end)
0
Make should your script is a `server script`. Also, debug this script first as I can't reproduce the issue efficiently from only one aspect. LinavolicaDev 570 — 4y
0
I have added a variable by adding the part that activates the outcome to the script, tried to debug and look at the developer logs and cannot see any problem but the decal does not work still. maxt2008 7 — 4y

Answer this question