Got ya. Insert an Animation Instance in the Script, and then change the Script to this code:
local repStorage = game:GetService("ReplicatedStorage")
local animation = script:WaitForChild("Animation") -- name of animation instance
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
repStorage.Events.KnifeSwingEvent.OnServerEvent:Connect(function()
local humanoid = character:FindFirstChild("Humanoid")
humanoid.Animator:LoadAnimation(animation)
animation:Play()
end)
end)
end)
Hope it helped!
Plus it’s not the simple ID, you sometimes have to make
Alright, it does seem to be something with the :FireServer() script.
But I am unsure as to why this is as it was working before.
local UserInputService = game:GetService("UserInputService")
local repStorage = game:GetService("ReplicatedStorage")
UserInputService.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
repStorage.Events.KnifeSwingEvent:FireServer()
end
end)