Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Having a players arms follow the mouse while also playing animations?

I have a script that orients the head to the player's mouse and welds the arms to the head, as well as animations for a gun. Animations work fine when I disable the welding function, but do not work when it is active. Is there any way around this?

script.Parent:WaitForChild("weldevent").OnServerEvent:Connect(function(plr, target, origin, c1)
		plr.Character.Torso.Neck.C1 = CFrame.new() 
		plr.Character.Torso.Neck.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.asin((target - origin).unit.y), 0, 0)
end)

torso.Neck is a Motor6d object and weldevent fires whenever a player moves their mouse. A seperate function changes Part0 of left shoulder and right shoulder to the head.

1 answer

Nevermind, I had the right solution to begin with. Use TweenService if you're looking to get this effect.

This discussion is preserved as it was. New answers, comments, and votes are closed.