So bassicaly i made a part that kill player when u is close, but when u are close it does not kill the player pls help:
01 | while true do |
02 | wait() |
03 | local player = game.Players.LocalPlayer |
04 | local char = player.Character |
05 | local distance = (workspace.LivingroomMonster.Position - char.LowerTorso.Position).Magnitude |
06 | if distance > 25 then |
07 | print ( "Far form monter" ) |
08 | else |
09 | char.Humanoid.Health = 0 |
10 | end |
11 | end |