I want the smooth terrain lava to kill a player when they step on it. How do I do this?

I tried this:

workspace.Terrain.Touched:connect(function(Hit)
	if Hit then
		if workspace.Terrain:GetCell(Hit:GetTouchingParts()[1].Position.X, Hit:GetTouchingParts()[1].Position.Y, Hit:GetTouchingParts()[1].Position.Z).Material == Enum.CellMaterial.CrackedLava then
			Hit:remove()
		else
			print('Lol. You aren\'t lava! You a wannabe!')
		end
	else
		print('THIS IS IMPOSSIBLE!!!')
	end
end)

1 comment

0

If it is too hard, just a use a transparent bricks over the smooth terrain lava.