This script is supposed to detect when a projectile reaches a minimum altitude, and then detonate. It doesn’t work, and it doesn’t print the test print statement I added to it. What did I do wrong? Here’s the script:
local it = script.Parent
function boom()
local explosion = Instance.new("Explosion")
explosion.BlastRadius = 25
explosion.BlastPressure = 20000
explosion.Position = it.Position
explosion.Parent = game.Workspace
wait()
it:Destroy()
end
it.Changed:Connect(function()
print("oof")
if it.Position.Y <= -1 then
boom()
end
end)
A script I ave that gets the position of a part has worked for years and today has stopped functioning, error log says it can’t index the position of the part. Engine bug or some change they made??