Character spins with a run service moving the camera to head

So I’m making a short project where the player simply picks up a radio, but everytime they activate the prompt, the character spins. I put the line that moves the cameras CFrame out of the run service and the character doesn’t spin, but when its in the run service, the character spins. Its not due to animation, hats, or the things around it.

(if you also have any methods to make the viewing of the arms more clean, please respond with that too! (Line 24-28))

local prox = game.Workspace.Radio.Prox.ProximityPrompt
local anim = script:WaitForChild("Animation")
local RS = game:GetService("RunService")

local function Pickup(plr:Player)
	local Character = plr.Character
	local h = Character.Humanoid
	local animator = h.Animator
	local loadanim = animator:LoadAnimation(anim)
	local Dummy = game.ReplicatedStorage.RadioPickupDummy
	local Camera = game.Workspace.CurrentCamera
	local Radio = prox.Parent.Parent

	prox.Enabled = false
	h.WalkSpeed = 0
	h.JumpPower = 0
	Character:SetPrimaryPartCFrame(Dummy.PrimaryPart.CFrame)
	loadanim:Play()
	
	local RunService1 = RS.RenderStepped:Connect(function()
		plr.CameraMode = Enum.CameraMode.Classic
		Camera.CameraType = Enum.CameraType.Scriptable
		Camera.CFrame = Character.Head.CFrame
		for _,v in pairs(Character:GetChildren()) do
			if v.Name == "LeftUpperArm" or v.Name == "LeftLowerArm" or v.Name == "LeftHand" or v.Name == "RightUpperArm" or v.Name == "RightLowerArm" or v.Name == "RightHand" then
				v.LocalTransparencyModifier = 0
			end
		end
	end)
	
	wait(3.5)
	
	RunService1:Disconnect()
	
	for _,v in pairs(Character:GetChildren()) do
		if v:IsA("BasePart") then
			v.LocalTransparencyModifier = 1
		end
	end
	
	Radio.Transparency = 1
	h.WalkSpeed = 16
	h.JumpPower = 50
	plr.CameraMode = Enum.CameraMode.LockFirstPerson
	Camera.CameraType = Enum.CameraType.Custom
	
end

prox.Triggered:Connect(function(plr)
	Pickup(plr)
end)

turn off the humanoid’s autorotate property

1 Like