Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago

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.

0
Paste the animationId in an animation instance in studio to get the correct assetId.. arshad145 392 — 6y
0
It still doesn't work Nilsen84 1 — 6y
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.. arshad145 392 — 6y
0
Animations **HAVE** to be done from the CLIENT using a LOCALSCRIPT. RubenKan 3615 — 6y
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) UgOsMiLy 1074 — 6y

1 answer

Log in to vote
0
Answered by 4 years ago

Hello, are you here?

Ad

Answer this question