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

How do I make the wheels of a car spin?

I am creating a cutscene for the opening of my game. The cutscene follows a moving car, now I can get the car model to move forwards, but it looks stupid as the tyres don't rotate.

Any ideas on how I would achieve this?

I have tried by using this very simple script, but it doesn't work, as the tyre flips 90 degrees.

for i = 0,100,1 do 
	script.Parent.Rotation = Vector3.new( 0, i, 0)
	wait()
end

Hope this makes sense.

1 answer

✓ Accepted answer

Assuming you dont care if the wheels perfectly match up with the road:

while true do
 script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,0.02,0)
 wait()
end

If you must have the wheels match the road, you're going to have to use a full car with physics & such unless some experienced coder happens to see this thread.

1 comment

0

This is perfect. Thank you!

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