I made a script that moves your arm up and down. I tried to make it FE with a remote function but it doesn't work for some reason. Can someone help? Am I doing something wrong? Thanks.
Here's what it looks like: https://gyazo.com/2529c4c9f89694a041dc731ca03e7399
^^^ The arm script doesn't move the arm for other players to see, only for the client.
Server script:
script.Parent.Equipped:Connect(function()
script.Parent.ArmEvent:FireAllClients()
end)
Local script:
script.Parent.ArmEvent.OnClientEvent:Connect(function()
game:GetService("RunService").RenderStepped:connect(function()
local function onEquipped(mouse)
active = true
while active == true do
shoulder.C0 = CFrame.new(1,0.5,0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y),1.55,0)
wait()
end
end
wait()
script.Parent.Equipped:connect(onEquipped)
script.Parent.Unequipped:connect(function()
active = false
shoulder.C0 = original
end)
end)
end)

2 comments
The script is made for a local script not server script. A server script can't get game.Players.LocalPlayer, so I don't know what to do.
NVM found out how to get local player from a server script Lol