#How To Make Animation Load And Actually Damage The Player
8 messages · Page 1 of 1 (latest)
local tool = game.StarterPack.Toothbrush
game.ReplicatedStorage.SwingSword.OnServerEvent:Connect(function(Player, Handle)
if Player.Character == nil then -- Make sure the character exists
return
end
local handle = tool.Handle
handle.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and hit.Parent ~= Player.Character then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - damage
end
end)
end)```
This is regular script inside sss
There is a remote event in replicated storage called SwingSword
no errors printed
I added some prints to the different functions and found that the local script is almost working just the animation is not playing
the server script isn't working at all
anyone?