Can someone show me how to make a sword do 0 damage when I player has died? Use a linkedsword as an example please, and edit that.
COMMUNITY QUESTION
Can someone show me how to make a sword do 0 damage when I player has died?
1 answer
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
local var = 0
repeat
wait(0.01)
local ifs = char.Humanoid = 0
if ifs then
plr.Backpack.LinkedSword.SwordScript:Destroy()
until var==10
end)
end)
Deleting the sword script tells if the player is lagging because they will still be moving and holding the sword. If they died. If I just made it do no damage you would have a distraction.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Changes the ifs value to just char.Humanoid.Health, then in the if statement use ifs == 0