Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Animations Aren't Working How They Are Supposed To Be?

So I Had A Previous Problem of The Animations Being Client Sided. So i used remote events. Also I am Trying To Make A Sword.

Local Script:

local tool = script.Parent
local debounce = false
local SlashSound = script.Parent.Attack

tool.Activated:Connect(function()
	if debounce == false then
		debounce = true
		---------------
		game.ReplicatedStorage.AnimationFired:FireServer(5046275187)
		SlashSound:Play()
		wait(1)
		---------------
		debounce = false
	end
end)

Then I Have My Normal Script:

game.ReplicatedStorage.AnimationFired.OnServerEvent:Connect(function(player,animationID)
	local Animation = Instance.new("Animation")
	Animation.AnimationId = "rbxassetid://"..animationID
	
	local LoadedAnimation = game.Workspace[player.Name].Humanoid:LoadAnimation(Animation)
	LoadedAnimation:Play()
end)

Please Help Thanks!

6 comments

0

What’s the problem? I can’t tell what the problem is if you don’t provide it.

0

Is the AnimationId correct?

0

yes

0

it works when i play solo

0

when i play with friends animations dont want to work

0

Make sure that you own the animation, meaning you created it. It will not work if it was created by another player/group.

1 answer

✓ Accepted answer

you can load animations on the client ive tried it before

i dont think you should load animations on the server though

1 comment

0

you should also change the animations to action/movement otherwise animate will be on top of all of those animations

This discussion is preserved as it was. New answers, comments, and votes are closed.