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

how to spin an object correctly?

Hello ! I am pretty new into Roblox scripting. So I have this circle baseplate (flat cylinder part) which should rotate around its middle point. I used this code for it:

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

This works fine. The object is spinning. But the character on this object isnt stick to it and doesnt move with the object. I hope you understand what i mean and can help. Thanks!

1 answer

Instead of putting the part's rotation manually everytime you could just use tweenService, a tutorial on it here

It doesn't make players move in its current state because there is no way for the game to recognize the players should be rotated, as they're not welded to the platform and the game thinks you're just rotating an object; instead with tweening it recognizes the platform is properly spinning and applies the force that makes the platform spin the players.

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