Hi, my problem is that when the floor deactivates the script when it gets on the car it keeps deactivating the script, it does not activate it once and then it is deactivated, because the cohce is touching the ground, what could I do?
local ground = game.Workspace.ground local car= game.Workspace.car.PrimaryPart car.Touched:Connect(function(touch) if touch then script.Parent.fire.Disabled = false end end) ground.Touched:Connect(function(touch) if touch then script.Parent.fire.Disabled = true end end)
I got it, thank you very much everyone.
local car = game.Workspace.car.PrimaryPart local ground = game.Workspace.ground local fire = game.Workspace.car.fire.fire car.Touched:Connect(function(touch) if touch then if touch.Parent ~= ground then fire.Disabled = false print("false") end end end) ground.Touched:Connect(function(touch) if touch then if touch.Parent ~= car.Parent then fire.Disabled = true print("true") end end end)