I have a LOCAL script that should match the orientation of the players torso to the camera. It's rather self explanatory and works on the client. However I don't know how to have the effect appear on the server. Thanks in advance for any help!

plr = game.Players.LocalPlayer
	repeat wait() until plr.Character
		local char = plr.Character
	game["Run Service"].RenderStepped:connect(function()
	local c = game.Workspace.CurrentCamera
	char.ChestJoint.Rotator.C0 = CFrame.new(0.9,0,0) * CFrame.Angles(6.5,math.acos					((c.CoordinateFrame.p - c.Focus.p).Unit.Y) + -1.5,0,0)
	char.ChestJoint.Rotator.C1 = CFrame.new(0,0.01,0) * CFrame.Angles(0,0,0)
	end)

2 comments

0

Not quite sure what you are asking. :GetRenderCFrame() might help.

0

Wait, I just realised that you made the variable char local, which means that it can only be accessed in that loop. You have to define the char variable before the loop or make it a global variable for that to work right.