Spinning part doesn't move player

I’m trying to make the rotating part make the player move with it, or any part on it for that matter.

Problem is, it doesn’t really work. I’ve read on another post that I would have to use a weld, however it doesn’t seem to rotate the player.

Just in case someone gives me this info that I’ve already done, yes the welded part is unanchored. yes, the rotating part has CanCollide set to false.

local RunService = game:GetService("RunService")

local spinningPart = script.Parent.Parent
local rotationSpeed = script.Parent.RotatePerSec.Value

local clonedPart = spinningPart:Clone()
clonedPart:ClearAllChildren()
clonedPart.Parent = script.Parent
clonedPart.Anchored = false

local weld = Instance.new("Weld", script.Parent)
weld.Part0 = clonedPart
weld.Part1 = spinningPart

spinningPart.CanCollide = false

RunService.Stepped:Connect(function(_, deltaTime)
	local rotation = CFrame.Angles(math.rad(rotationSpeed.X * deltaTime), math.rad(rotationSpeed.Y * deltaTime), math.rad(rotationSpeed.Z * deltaTime))
	spinningPart.CFrame = spinningPart.CFrame * rotation
end)
3 Likes

changing the CFrame of a part doesn’t apply any forces to anything by itself, you’ll have to also change AssemblyAngularVelocity to get the effect you want; this also applies to anything welded to it

1 Like

okay, yea i understand that changing the CFrame doesnt do anything, since its just changing the way it looks and doesnt use physics.
How would I use the angular velocity? Like make it always the rotation speed?
And would i be able to do that with a group that rotates around the primary part?

honestly i don’t really know how to set angular velocity correctly for a case like this, i’d pretty much just mess around until it “feels right”
i’m pretty sure if you set it on the anchored part then it’ll work as expected

alright i could try.
I’ll reply if it works or not

try using a HingeConstraint HingeConstraint | Documentation - Roblox Creator Hub

1 Like

it works but not for groups, or at least its a little weirder for groups.
But, thanks!

I could try this, I’ll see if it works.

I fixed it using a local script, since I still wanted to rotate it using CFrame.
its a very not simple fix, that took a while.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.