I’ve been scripting over the years but have never tried to run code within the second parameter of FireClient()
my question is does this work as in running on the client instead of the server?
I’ve been scripting over the years but have never tried to run code within the second parameter of FireClient()
my question is does this work as in running on the client instead of the server?
Nope.
What your code sample does is it runs Animator:LoadAnimation(Animation):Play()
on the server, then fires the client with the result of :Play(), which is nil
(no result).
So the code you provided would be equivalent to:
game.Players.PlayerAdded:Connect(function(player)
local Character = workspace.Animations
local Animator = Character.Humanoid.Animator
local Animation = Character.Humanoid.Animator.Animation
Animator:LoadAnimation(Animation):Play()
ReplicatedStorage.E7:FireClient(player)
end)
you’ll need to have a localscript listening to the event and then play the animation, no sending animator required just player is needed
i figured since i could’ve just tested it by using print() and looking at the color