You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? I wanna make a button that make my car go super fast the way it face for 5 second
-
**What is the issue?**I use CFrame.lookvector * 10000 and that work well for the first try,Then after it’s cooldown is over i press it again and istead of going where the car face,The car goes in the wrong direction
-
**What solutions have you tried so far?**I’ve change the *10000 to *-10000 which make the car goes opposite of the car’s facing then when i click it again (facing 90 degree left from the original facing)It goes completely worng,Instead of going opposite of the facing it goes in a random direction
local debounce = false
script.Parent.ClickDetector.MouseClick:Connect(function()
if debounce == false then
script.Parent.BodyThrust.Force = script.Parent.CFrame.LookVector * 10000
debounce = true
wait(5)
script.Parent.BodyThrust.Force = Vector3.new(0,0,0)
wait(20)
debounce = false
print("reloaded")
end
end)