How would you rotate a character with a part (like from an obby)

i have a script that spins the part but i want it so that the player spins as well so its a bit harder for the player. how would you do that?

script:

local rs = game:GetService("RunService")

rs.Heartbeat:Connect(function(deltatime)
for i, child in ipairs(workspace:GetChildren()) do
	if child.Name == "cylinder1" then
		local pp = child.PrimaryPart
		pp.CFrame *= CFrame.fromOrientation(0, 5 * deltatime, 0)
	end
end	 
end)

vid:

You could try using the Angular Velocity attachment for that.

1 Like

hey man hows it going i tried to do what u said but i cant seem to get it to work. ive never used angular velocity before so im not sure how to set it up.

Rotating Part Model.rbxm (5.7 KB)
Here is an example of how you can do it.
Note that the rotating part cannot be anchored otherwise it won’t rotate.

1 Like

hey whats up man, thanks for ur help i figured it out yesterday :slight_smile:

1 Like