Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how do i make a function fire on parts collided?

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?

2 comments

0

What does: Workspace.AirDrop.Dropdown.Disabled = false do?

0

If the two parts that are supposed to fire are anchored, then that may be the problem. If not that, no idea.

1 answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.