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

How can I interconnect function according to the touch?

Hi, I'm messed up I've changed everything to if I have a new thread, I have two functions in one that plays the car and another stops and a debounce function until everything is fine, but when I try to change the function, start with the stop it is touching the ground, and the movement of the car comes out, I know it will be something simple, but I do not hit the key. Thank you.

ground.Touched:Connect(debounce(function(touch)
	if touch.Parent ~= car then
		print("stop")
		StopCar()
	elseif touch.Parent == car then
		print("star")
		StartCar()
	end
end))

1 answer

I change it for this, if it works but only the sound the fire keeps going.

ground.Touched:Connect(debounce(function(touch)
	if touch.Parent ~= car then
		print("stop")
		StopCar()
	end
end))
car.PrimaryPart.Touched:Connect(debounce(function(touch)
	if touch.Parent ~= car then
		print("star")
		StartCar()
	end
end))

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