Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How would I make my character animations replicate in FE?

Asked by
Auzer 7
6 years ago

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.

1 answer

Log in to vote
0
Answered by 6 years ago

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)
Ad

Answer this question