Basically I made a script so that when the remote is fired, it finds the player who fired it and plays an animation on them. For some reason it doesn't work and nothing shows up in the output.
local LA = game.ReplicatedStorage.LightAttack
local HA = game.ReplicatedStorage.HeavyAttack
local swordanim = game.ReplicatedStorage.Animation1
LA.OnServerEvent:Connect(function(plr)
local player = plr
local char = player.Character or player.CharacterAdded:Wait()
local hum = plr:WaitForChild('Humanoid', 10000)
local anim = hum:LoadAnimation(swordanim)
anim:Play()
print'works'
end)
HA.OnServerEvent:Connect(function(plr)
local name = plr.Name
local player = game.Workspace:FindFirstChild(name)
local hum = player:FindFirstChild('Humanoid')
end)
