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)
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!