So I've literally been spending days trying to figure out how on earth the math for mario kart style drifting would be.
I am really bad when it comes to the math side of programming in general, it is so confusing for me to understand more complex integrations.
Here's what I have written currently:
local primaryPart = script.Parent.Parent.Parent.PrimaryPart
script.Parent.Changed:Connect(function()
while true do
if script.Parent.Value == false then
break
end
-- drift here
wait()
end
end)
Within the 'drift here' comment, I have use a number of different things including:
- Nested for loops
- TweenService
- CFraming
- Vectoring
I have also searched up similar works where the closest I have found was a realistic one done on unity and the unity java code works takes in very different inputs from roblox lua.
Even a push in the right direction is a big help. Thank you.

2 comments
Can you show Mario Kart Style Drifting? Send a video recording pls thx
I mean, I found this: https://www.youtube.com/watch?v=Ki-tWT50cEQ&ab_channel=MixandJam but it is for unity games. The translated code would look different for roblox lua games but because physics differ slightly on roblox, I need to translate it for it to work. I have since tried many methods but they just result in the kart glitching stuck in the same position.