PROBLEM: There’s a script I’m making, the point of this certain series of codes is to spawn the ‘Shade’ entity from the part (MainTruss) specified within the script; The enemy is spawning in pieces, and the enemy is only spawning once instead of the intended 11.
INFO: The thing is, the enemy’s spawning is triggered when another script in the model fires an event(Bindable) upon exploding. The explosion scatteres it’s body parts so I delayed the spawn, if there’s any way you can help me to make it so the enemy isn’t torn to pieces upon the explosion.
CODE:
local bind = game.ReplicatedStorage.Upon_Being_Broken
local limit = 11
local shade = game.ServerStorage.Shade
local SP = script.Parent
local DB = false
bind.Event:Connect(function()
if DB then return end
local enemy = shade:Clone()
local humanoid = enemy.Humanoid
enemy.Torso.CFrame = SP.CFrame
wait(30)
for i = 1, limit do
enemy.Parent = workspace
end
DB = true
end)