I'm trying to make arms that tilt in the direction the mouse is pointing. I have tried both Weld and Motor6D but none replicates in FE. My guess would be to create a ROBLOX animation and then position the time that corresponds to the mouse's Y axis.
✓ ANSWER ACCEPTED
How would I make my character animations replicate in FE?
1 answer
✓ Accepted answer
Use trig.
local char = player.Character
local mouse = player:GetMouse()
local rus = game:GetService("RunService")
local c = workspace.CurrentCamera
local rp = c.CameraFocus.RootPart
rus.RenderStepped:Connect(function()
local vec = (mouse.Position-rp.Position).unit
local pitch = math.atan2(vec.Y, vec.Z) --< If it's opposite change this to vec.Z, vec.Y
--send pitch to server and do arm lifting there
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
