Spinning kill brick acting up

so i have this spinning kill brick as a part of a minigame i have and when i dodge them, it will sometimes kill me even if i havent touched it.

local Killer = script.Parent

local function steppedOn(part)
	local parent = part.Parent
	if game.Players:GetPlayerFromCharacter(parent) then
		parent.Humanoid.Health = 0
		wait(2)
	end

end

Killer.Touched:Connect(steppedOn)

while wait() do
	script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0.0,0.1,0.0)
end
1 Like

Here try this.

local Killer = script.Parent

local function steppedOn(part)
	local parent = part.Parent
	if game.Players:GetPlayerFromCharacter(parent) then
		parent.Humanoid.Health = 0
	end

end

while wait() do
	Killer.Touched:Connect(steppedOn)
	script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0.0,0.1,0.0)
end
1 Like