I’m currently trying to clone a drink tool for a shop system.
The tool is supposed to be cloned over (which it does), and when clicked, will play the drinking animation.
Currently the animation does not play at all and there are no errors.
The tool is being cloned by a server script.
The line (in a local script): game.ReplicatedStorage.ToolEvents.BlurEvent:FireServer()
The line in the server script:
game.ReplicatedStorage.ToolEvents.BlurEvent.OnServerEvent:Connect(function(player)
if player.leaderstats1.Coins.Value >= 15 then
player.leaderstats1.Coins.Value = player.leaderstats1.Coins.Value - 15
game.ServerStorage.Tools.BlurBerry:Clone().Parent = player.StarterGear
game.ServerStorage.Tools.BlurBerry:Clone().Parent = player.Backpack
end
end)
local Player = game.Players.LocalPlayer
Char = Player.Character or Player.CharacterAdded:Wait()
local animation = Char:WaitForChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(script.Parent.Animation)
script.Parent.Activated:Connect(function()
animation:Play()
end)
script.Parent.Unequipped:Connect(function()
animation:Stop()
end)
Humanoid:LoadAnimation() is deprecated.
Second, what is the Priority of the animation? Is it in Action?