with much sacrifice I managed to get up here on my wall script that break with a shot but now I need help I give a shot only and it disassembles want to leave her toughest how can I do this ? function onHit(part)

function onHit(part)
	vX = math.abs(part.Velocity.x - script.Parent.Velocity.x)
	vY = math.abs(part.Velocity.y - script.Parent.Velocity.y)
	vZ = math.abs(part.Velocity.z - script.Parent.Velocity.z)
	totalVelocity = vX + vY + vZ
	print(totalVelocity)
	if totalVelocity >= 0.1 then
		script.Parent.CanCollide = false
		script.Parent.Sound:play()
		script.Parent:remove()
	end
end

script.Parent.Touched:connect(onHit)

6 comments

0

What are you even asking?

0

a way for her to be tougher and have a life there know just when it destroys all

0

Do you know English?

0

google tlaslade

0

Use a 'Health' value then deplete from that value every hit. Then use your destroy function when the Health = 0

1

He is using translate, so try and dumb down your explanations.