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

I need help to make an animation that doesn't work. Any help?

In an local script I have this:

script.Parent.Activated:Connect(function()
	local Event = game.ReplicatedStorage.HammerAnimation
	Event:FireServer(1441361561)
	
	
end)

and in an normal script in the workspace I have this

game.ReplicatedStorage.HammerAnimation.OnServerEvent:Connect(function(player, animationId)
	local animation = Instance.new("Animation")
	animation.AnimationId = "rbxassetid://" .. animationId
	local something = workspace[player.Name].Humanoid:LoadAnimation(animation)
	something:Play()
end)

Nothing happens when I activate the tool.

5 comments

0

Paste the animationId in an animation instance in studio to get the correct assetId..

0

It still doesn't work

0

Wait , I just realised... why are you firing animation to the server? Even while FE is on , I think animation plays for the player and can be seen by all others..

0

Animations HAVE to be done from the CLIENT using a LOCALSCRIPT.

0

Actually, they can be done just as well as a server script, using the Animator inside the Humanoid. http://wiki.roblox.com/index.php?title=API:Class/Animator . In fact, as for your second script, change line 4 to: local something = player.Character.Humanoid.Animator:LoadAnimation(animation)

1 answer

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