of     1   

ferano
#183796913Wednesday, February 17, 2016 2:16 AM GMT

What is wrong with this script? local p = game.Players.LocalPlayer local mouse = p:GetMouse() local Tool = script.Parent local Event = Tool:WaitForChild("RemoteEvent") mouse.KeyDown:connect(function(ky) local key = string.lower(ky) if key == "f" then Event:FireClient(p, "RunAnimation", "InspectAnimation") --Animation gets played end end)
[rfa#hidefromsearch]
#183797447Wednesday, February 17, 2016 2:23 AM GMT

[rfa#hidefromsearch]
ferano
#183797550Wednesday, February 17, 2016 2:24 AM GMT

So then in localscript how do I play an animation from the tool
[rfa#hidefromsearch]
#183798616Wednesday, February 17, 2016 2:37 AM GMT

[rfa#hidefromsearch]
ferano
#183800125Wednesday, February 17, 2016 2:58 AM GMT

Like this? local p = game.Players.LocalPlayer local character = p.Character or p.CharacterAdded:wait() local h = character:WaitForChild("Humanoid") local Tool = script.Parent local Event = Tool:WaitForChild("Event") local tracks = {} Event.Event:connect(function(mode, ...) if (mode == "RunAnimation") then local animName = "InspectAnimation" if (not tracks[animName]) then tracks[animName] = h:LoadAnimation(assert(Tool:FindFirstChild(animName), "The Animation '" .. animName .. "' is not under the tool.")) end tracks[animName]:Play() end end)
ferano
#183800961Wednesday, February 17, 2016 3:11 AM GMT

I tried it your way, I got this error message "ContentProvider callback exception: Unable to dispatch task"
PureConcept
#183801157Wednesday, February 17, 2016 3:15 AM GMT

:FireServer
[rfa#hidefromsearch]
#183802147Wednesday, February 17, 2016 3:30 AM GMT

[rfa#hidefromsearch]
cofunction
#183802254Wednesday, February 17, 2016 3:32 AM GMT

Use "FireServer" from the client to call it to the server. Note: the first 'tuple' when receiving it from the server will be the client itself (the player).

    of     1