Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can't get the object to respawn rather than to be destroyed, help?

print("LandMine Script Loaded")

LandMine = script.Parent

function onTouched(hit)
  explosion = Instance.new("Explosion")
  explosion.BlastRadius = 20
  explosion.BlastPressure = 100000
  explosion.Position = script.Parent.Position
  explosion.Parent = game.Workspace
  script.Parent.Transparency = 0
wait(2)
game.Workspace.Meteor.Meteor1:Destroy()
end

connection = LandMine.Touched:connect(onTouched)

This is the code i used to make the Meteor fall, hit the ground, and in 2 seconds go away. My only problem is that it gets destroyed, aka deleted from the game. Im trying to make it so that it goes away, and in 10 seconds respawns where it started from.

2 comments

0

What is the "Meteor" object in line 13?

0

It's what my object is called, it's a meteor. Meotor is the model and Meteor1 is the meteor itself.

1 answer

✓ Accepted answer

Well, I'm not sure exactly what to do.

One thing you could try, however, is make it clone from lets say ServerStorage when the object is activated, and then clone into workspace, and then delete, repeat.

2 comments

0

That's a pretty good idea. Having no other options at the moment ill try that, since I know how to work with the ServerStorage well.

0

Tell me if it works ^^

This discussion is preserved as it was. New answers, comments, and votes are closed.