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:

while true do
	wait()
	local player = game.Players.LocalPlayer
	local char = player.Character
	local distance = (workspace.LivingroomMonster.Position - char.LowerTorso.Position).Magnitude 
	if distance > 25 then
		print("Far form  monter")
	else
		char.Humanoid.Health = 0
	end
end

2 comments

0

Where's your script located in the game?

0

in the monster