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

how do i make a function fire on parts collided?

Asked by
n_ubo 29
4 years ago
local part = script.Parent

part.Touched:Connect(function() 
    script.Parent.Sound1:Play() --play drop sound
workspace.AirDrop.Dropdown.Disabled = false --launch
workspace.AirDrop.Transparency = 0 --reveal airdrop
wait(18)
workspace.AirDrop.Dropdown.Disabled = true --reset down fall script for next one


end)


line 3 doesn't fire! i am trying to make an airdrop drop when the plane touches it. the airdrop and the plane are both unions. m8 that be the problem? else if so, what do i need to do?

0
What does: Workspace.AirDrop.Dropdown.Disabled = false do? 123nabilben123 499 — 4y
0
If the two parts that are supposed to fire are anchored, then that may be the problem. If not that, no idea. hoyhyo 2 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

I think this might work but i'm not sure

local part = script.Parent

part.Touched:Connect(function(hit)
    if hit.Name == "Part" then -----Whatever the name of the part is
    script.Parent.Sound1:Play() 
workspace.AirDrop.Dropdown.Disabled = false
workspace.AirDrop.Transparency = 0
wait(18)
workspace.AirDrop.Dropdown.Disabled = true 


end)
Ad

Answer this question