-
What do you want to achieve?
Hello again! I am trying to make a explosion tile system for the bombs in my game, which go in a + shape, similarly to Bomberman’s explosions. -
What is the issue? Despite being in a loop, the section where it checks if its touching other explosions only executes once.
I’m using the script below:
if MaxDistance > MaxPower.Value
for _ = 1, MaxPower.Value do --if Max Power is 5, it will clone the tile and move it 5 times
local ExplosionTileUp = ExplosionTile:Clone()
ExplosionTileUp.Parent = bomb
local TileCheck = workspace:GetPartsInPart(ExplosionTileUp)
if #TileCheck > 0 then
task.wait(0.001)
ExplosionTileUp.CFrame = (ExplosionTile.CFrame + Vector3.new(0, 0, -6))
end
end
end
And here is how it currently looks ingame (it’s supposed to only go upwards for the moment):
Any help is appreciated. Thank you!!