I want arms to be attached to head with script (so i can run animations too).
Sorry for bad English.
I want arms to be attached to head with script (so i can run animations too).
Sorry for bad English.
Very simple!
You can weld the arms and head together to make what we call a “ViewModel” or “Rig” and set the CFrame to the Camera CFrame in a RenderStepped loop!
The finished code should look something like this:
Game:GetService("RunService").RenderStepped:Connect(function()
Rig.Main.CFrame = workspace.CurrentCamera.CFrame
end)
But will it work for animations?
You could just use the new IK Control and a loop which moves a attachment that is parented to terrain, based on where the player is looking on the client. The target property of the IKControl is just set to the attachment
this will only run on client
i think what he means is for other players so you could change the c1 values of the right and left shoulders and neck motor6ds in the character torso.
however this means you have to do it in renderstepped locally and send the camera.CFrame:ToEulerAnglesXYZ() to a remoteevent in a server script every .5 seconds or so
This is a example place that i have made once (it’s still not finished yet) that demonstrates a basic usage of this new instance (it was before the constraint for it was introduced so I had to make my own that is kinda junky), if you want you could just mess around with the end effector parameter to adjust “what” is pointing towards the target
IK Control Third Person Camera Example.rbxl (177.2 KB)
Wouldn’t this move every limb?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.