Need help with my code to see why my Animation isn’t playing.(An Idle to be specific) I also already changed the priority and activated looping. Also if you have better tips on how I can organize this I would like to hear them.
The Code:
LocalScript:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("Stick")
local Tool = script.Parent
Tool.Equipped:Connect(function()
RemoteEvent:FireServer()
end)
ServerScript:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage.Stick
local Debounce = false
local Animation = Instance.new("Animation")
local StickIdle = "http://www.roblox.com/asset/?id=5072046182" local StickCom1 = "rbxassetid:5083926093" local StickCom2 = "rbxassetid:5083965419" local StickCom3 = "rbxassetid:5084008095"
local StickAnimations = {StickIdle,StickCom1,StickCom2,StickCom3}
RemoteEvent.OnServerEvent:Connect(function(Player)
Animation.AnimationId = StickIdle
local Char = Player.Character
local Humanoid = Char.Humanoid
local AnimationTrack = Humanoid:LoadAnimation(Animation)
end)