How do you make it so if something Explodes; there becomes a Sphere that basically appears at the explosion? I only know how to do the instance.new I cannot mannage to exactly make the two functions cooperate together.
COMMUNITY QUESTION
How can I make this Explosion?
1 answer
You don't need to make "two functions cooperate", you just write your code like you normally would. You probably are looking for something like this maybe?
function explode(pos) -- I'd make a function for it
local sphere = Instance.new("Part")
sphere.Shape = Enum.PartType.Ball
sphere.CanCollide = false
sphere.Anchored = true
sphere.Size = Vector3.new(25, 25, 25)
sphere.Transparency = .7
sphere.BrickColor = BrickColor.Yellow()
sphere.CFrame = CFrame.new(pos)
local exp = Instance.new("Explosion")
exp.Position = pos
sphere.Parent = Workspace
exp.Parent = sphere
Game:GetService("Debris"):AddItem(sphere, 3)
end
-- Ex:
explode(Vector3.new(0, 0, 0))
Part.Touched:connect(function() -- A usage example
explode(Part.Position)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
I've upvoted you, but please change your script's line 14 to be 'game:GetService("Debris"):AddItem(sphere,3)'. It's a better solution.
And why is that a better solution?
Never question the Weaver. The last one to question 'It' has never been seen again.
I'll try my luck :p