First of all, I am not an English speaker, so... sorry if my English is difficult to understand :(
Well... Im trying to make a script that execute a LocalScript (Via RemoteEvent), The LocalScript works to remove every animation that the player has and it works BUT here is my problem:
ServerScript, inside of the seat. (Execute the LocalScript when the player Jumps out of the seat):
game.Players.PlayerAdded:Connect(function(player) --My Possible problem
local plr = game.Players:WaitForChild(player.Name) --My Possible problem
local Seat = script.Parent
local humanoid = nil
local function sat()
if humanoid == nil then
humanoid = Seat.Occupant
return
end
wait(3)
game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent"):FireClient(plr)--My Possible problem
humanoid = nil
end
Seat:GetPropertyChangedSignal("Occupant"):Connect(sat)
end)
LocalScript (StarterPlayerScripts):
game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent").OnClientEvent:Connect(function()
local Humanoid = game.Players.LocalPlayer.Character.Humanoid
local ActiveTracks = Humanoid:GetPlayingAnimationTracks()
for _,v in pairs(ActiveTracks) do
v:Stop()
end
end)
So, when I try the game, It works, The LocalScript Stop all the animations that the player has when the player jumps out of the seat BUT when I play in a LocalServer (2 Players) I noticed that when some player jump out of the seat, (I guess the ServerScript) stops ALL PLAYERS animations instead of the animations of the player who was sitting on that seat.
I looked in the Dev Hub and some guy said that if we put: (player.Name) It will execute the script just for that specific Client who sat in the seat. (Im not sure about it because its doesn't works for me). Thats all.
Please somebody answer me, If you need more details, tell me.

6 comments
I would like you edit your :FireClient(plr) to :FireClient(player, plr) and in Local Script add this line in line 2, if plr == game.Players.LocalPlayer.Name then and your code
Also add plr parameter in OnClientEvent
@BestCreativeBoy well i did everything you told me, i tried the game but now nothing happens, animations are not removed. (There is no error in the output)
And I think I shouldn't edit the LocalScript because I don't think the problem Is in the LocalScript
hello?
Check the code again, I made an error. Now, it should work.