I made several attempts to make an animated tool, but for some reason, the animations that I put in them never run, even if the code executes them.
My last most desperate attempt was to use a RemoteEvent, but it still doesn't work.
LocalScript
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Remote = script.Parent:WaitForChild("RemoteEvent")
script.Parent.Equipped:Connect(function()
Mouse.Button1Down:Connect(function()
Remote:FireServer()
end)
end)
Script
local Remote = script.Parent:WaitForChild("RemoteEvent")
Remote.OnServerEvent:Connect(function(Player)
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Animation = Humanoid:LoadAnimation(script.Parent.Animation)
Animation:Play()
end)

1 comment
Thank you