local player = game.Players.LocalPlayer local player = game.Players.LocalPlayer repeat wait() until player.Character.Humanoid local humanoid = player.Character.Humanoid local mouse = player:GetMouse() local RemoteEvent=game.ReplicatedStorage.Fired local UIS=game:GetService("UserInputService") local humanoid = player.Character.Humanoid local mouse = player:GetMouse() local anim = Instance.new("Animation") ---------------------------------------------------------------- local RemoteEvent=game.ReplicatedStorage.Fired local UIS=game:GetService("UserInputService") local DEbounce=false ---------------------------------------------------------------- UIS.InputBegan:Connect(function(Input) RemoteEvent:FireServer(DEbounce) ---------------------------------------------------------------- anim.AnimationId = "rbxassetid://1677718651" mouse.KeyDown:connect(function(key) if key == "r" then local playAnim = humanoid:LoadAnimation(anim) playAnim:Play() end end) end)
I fixed it...It was in the wrong line:
local player = game.Players.LocalPlayer local player = game.Players.LocalPlayer repeat wait() until player.Character.Humanoid local humanoid = player.Character.Humanoid local mouse = player:GetMouse() local RemoteEvent=game.ReplicatedStorage.Fired local UIS=game:GetService("UserInputService") local humanoid = player.Character.Humanoid local mouse = player:GetMouse() local anim = Instance.new("Animation") ---------------------------------------------------------------- local RemoteEvent=game.ReplicatedStorage.Fired local UIS=game:GetService("UserInputService") local DEbounce=false ---------------------------------------------------------------- ---------------------------------------------------------------- mouse.KeyDown:connect(function(key) if key == "r" then anim.AnimationId = "rbxassetid://1677718651" RemoteEvent:FireServer(DEbounce) local playAnim = humanoid:LoadAnimation(anim) playAnim:Play() end end)