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

I want to make a block that sounds from another block when tapped ?

Asked by 2 years ago
Edited 2 years ago

i dont know scripting so much.. so i tried to do like this but it didnt work can somone help?

local Trigger = game.Workspace.Trigger
script.Parent.Touched:connect(function(hit) 
    if hit and hit.Parent:FindFirstChild('Humanoid') then
        local sound = workspace.Trigger.NightVision
        sound:play()

1 answer

Log in to vote
0
Answered by 2 years ago

? Fixed it myself here is the code

local Trigger = game.Workspace.Trigger.NightVision
script.Parent.Touched:connect(function(hit) 
    if hit and hit.Parent:FindFirstChild('Humanoid') then
        Trigger:play()
    end
end)
Ad

Answer this question