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)

5 comments
https://www.robloxdev.com/api-reference/event/BasePart/TouchEnded
https://www.robloxdev.com/articles/Debounce
I already tried those methods and they did not work for me, thanks.
Because other parts of the car are touching it, firing Touched. Add a conditional that checks if touch.Parent ~= car.Parent
The thing is that when it enters the vehicle it takes possession of the player and touches the ground I have put a print and the debounce works halfway and the check of if ~ = enters without problems.