Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can someone show me how to make a sword do 0 damage when I player has died?

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.

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.

1 comment

0

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

This discussion is preserved as it was. New answers, comments, and votes are closed.