I done a Script inside ServerScriptService wich contains the following code:

local Players = game:GetService("Players")
 
local function onCharacterAdded(character)
	local humanoid = character:WaitForChild("Humanoid")
 
	for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
		playingTracks:Stop(0)
	end
 
	local animateScript = character:WaitForChild("Animate")
 
	animateScript.idle.Animation1.AnimationId = "rbxassetid://5432167890"
	
	animateScript.walk.WalkAnim.AnimationId = "rbxassetid://1759277502"
	
	animateScript.jump.JumpAnim.AnimationId = "rbxassetid://1760393958"
	
	animateScript.fall.FallAnim.AnimationId = "rbxassetid://1760423961"
end
 
local function onPlayerAdded(player)
	if player.Character then
		onCharacterAdded(player.Character)
	end
	player.CharacterAdded:Connect(onCharacterAdded)
end
 
Players.PlayerAdded:Connect(onPlayerAdded)

Anyone knows why it removes the animations of the character, but it doesn't load this ones?

9 comments

0

the only animations that should be loaded on the server should be NPCs. player animations should be done on the client

0

So I'll have to put this script in the StarterPlayer?

0

No

0

Where do I put it?

0

You play animations on the player client side, but this requires a rewrite so it works

0

And how should the script look?

0

Also why did you make a separate function for onCharacterAdded, why don't you just keep it all in one function? Keep that in mind for the future because as incapaxian said, this will require a rewrite.

0

I just followed what the develop.roblox.com official tutorial said

0

So, where should I put the script, and what should I change?