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

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

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)

1 comment

0

are there no errors?

1 answer

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!

2 comments

0

Oh well I actually messed up, they are local scripts and I got confused sorry.

0

oh ok

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