How to make an object spin client side

I am making an obby game and I am trying to make a spinning part that players can stand on. I had it done and it was working but it was causing terrible server lag, even if I only had like 2 of them. Someone suggested that I use local scripts but when I put the script into localplayerscripts it doesn’t work. I get no errors or anything it just does work. This is the script that works when inside of the part on a server script but doesn’t work inside playerscripts in a local script. I can’t use tween because players won’t be able to stand on it.

local function CreateSpinningPartNew(part : BasePart,AngularVelocity : Vector3,Position : Vector3)
	Position = Position or part.Position
	AngularVelocity = AngularVelocity or Vector3.new(0,.03,0)
	AngularVelocity = CFrame.Angles(AngularVelocity.X,AngularVelocity.Y,AngularVelocity.Z)

	local TerrainAtt = Instance.new("Attachment",workspace.Terrain)
	TerrainAtt.WorldPosition = Position

	local PartAtt = Instance.new("Attachment",part)
	
	local AP = Instance.new("AlignPosition",part)
	AP.Attachment0 = PartAtt
	AP.Attachment1 = TerrainAtt
	AP.MaxForce = math.huge
	AP.Responsiveness = 1

	local AO = Instance.new("AlignOrientation",part)
	AO.Attachment0 = PartAtt
	AO.Mode = Enum.OrientationAlignmentMode.OneAttachment
	AO.MaxTorque = math.huge
	AO.CFrame = part.CFrame
	AO.Responsiveness = 1

	AO.Enabled = false
	game:GetService("RunService").Heartbeat:Connect(function()
		AO.CFrame *= AngularVelocity
	end)
	AO.Enabled = true
end

CreateSpinningPartNew(game.Workspace.SpinningPart)