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)
You can't run
script.Parent.Equipped:Connect
from a server script as far as I know, you'll want to do that in a localscript, fire it to the server, which fill fireallclients with the info. If this helped you out, please mark it as the answer