You should only fire the function when a rocket explodes. As for the parts being stuck, are they unanchored? If not, it may be that before removing the items, you want to unanchor them:
for _, part in pairs(parts) do
part.Anchored = false
game:GetService("Debris"):AddItem(part,5)
end
They are all unanchored, All held by weld and joints.
I think itās just a bug because of the amount of parts flyingā¦
And I want to make a delay between the explosion to the parts disappearā¦ Something like 5 seconds, How to do it?
This script is pretty good, But itās not destroying all fallen partsā¦ Itās only destroying 4 - 5, When all the other parts are on the groundā¦
if ExplodeEvent then
Rocket.Touched:Connect(function(TouchPart)
if not IGNORE_LIST[string.lower(TouchPart.Name)] and not TouchPart:IsDescendantOf(Character) then
ExplodeEvent:FireServer(Rocket.Position)
rocketExploded()
if callFunction == false then
callFunction = true
LocalTouchSound:play()
Iām tired of doing this to the rocket launcherā¦
Is there some kind of a script I can put in the model of my buildings? Or put it in every single part?