For example, someone does a ki blast and it hits something else like a part or a floor and it has a explosion effect.
How do i make an effect like a explosion when something hits the ground or a part?
1 answer
(FIXED AGAIN!)
I AM SORRY, I DIDN'T HAVE TIME TO TEST THIS IN STUDIO MODE!
Name the Object Ball and if you wanna name it something else change the name of Ball in the script to what you name the object in server storage!
Place the ball where you want in workspace make it unanchored and place it in ServerStorage
PLACE THIS SCRIPT IN THE PART YOU WANT THE BALL TO TOUCH AND PLACE THE BALL OVER THE OBJECT!
script.Parent.Touched:Connect(function(hit)
wait(math.random(3,5)) --do anytime
game.ServerStorage.Ball:Clone().Parent = game.Workspace
if hit.Parent.Name == 'Balls' then
game.ServerStorage.Ball:Remove().Parent = game.Workspace
--Script any effect you want here when the ball hits the ground!
elseif hit.Parent.Name ~= nil then
game.ServerStorage.Ball:Remove().Parent = game.Workspace
--Script any effect you place when the ball hits the ground
end
end)
If you want it to be a model with a whole bunch of balls drop make the Model name Balls and make it unanchored
script.Parent.Touched:Connect(function(hit)
wait(math.random(3,5)) --do anytime
game.ServerStorage.Ball:Clone().Parent = game.Workspace
if hit.Parent.Name == 'Balls' then
game.ServerStorage.Balls:Remove().Parent = game.Workspace
--Script any effect you want here when the ball hits the ground!
elseif hit.Parent.Name ~= nil then
game.ServerStorage.Balls:Remove().Parent = game.Workspace
--Script any effect you place when the ball hits the ground
end
end)
3 comments
If that doesn't work place the Balls model or Balls in Lighting and change ever 'ServerStorage' to 'Lighting'
thanks
Can you please accept my answer. It will really help me and you get some reps also.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Check out the Touched event: http://wiki.roblox.com/index.php?title=API:Class/BasePart/Touched and Instances: http://wiki.roblox.com/index.php?title=Instance_(Data_Structure)