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

Server isn't loading my animation, is there a specific reason why?

Asked by 3 years ago
Edited 3 years ago

I have a tool in 'Replicated Storage' that uses a proximity prompt to get, though that tool has an attack animation that wont load in for some reason, whenever i click nothing happens

ps : script is a ClientSide located inside the tool along with a animation located inside the tool

script.Parent.Equipped:Connect(function(Mouse)
    Mouse.Button1Down:Connect(function()
        animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
        animation:Play()
    end)
end)


script.Parent.Unequipped:Connect(function()
    animation:Stop()
end)
0
are there no errors? sne_123456 439 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Hi the problem is that you have used a server sided script. You cannot find a local player through a server-sided script, therefore the script cannot reach the local player and hence, cannot play the animation. Try a localscript instead

Hope this helps!

Any questions? Just ask!

0
Oh well I actually messed up, they are local scripts and I got confused sorry. Black_Magic2533 104 — 3y
0
oh ok sne_123456 439 — 3y
Ad

Answer this question