Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Making a regen script? [closed]

Asked by 10 years ago

How could I create a regen script? I am using the one here:

---Place this INSIDE the model. Don't replace the model name or anything.
------------------------------------------------------------------------------------------ 
object = script.Parent 
if (object ~= nil) and (object ~= game.Workspace) then 
model = object 
messageText = "regenerating " .. model.Name .. "" 

message = Instance.new("Message") 
message.Text = messageText 
backup = model:clone() -- Make the backup 
waitTime = 255 --Time to wait between regenerations 
wait(math.random(0, waitTime)) 
while true do 
wait(waitTime) -- Regen wait time 

message.Parent = game.Workspace 
model:remove() 

wait(2.5) -- Display regen message for this amount of time 

model = backup:clone() 
model.Parent = game.Workspace 
model:makeJoints() 
message.Parent = nil 
end 
end 
------------------------------------------------------------------------------------------ 

I don't want a message to be displayed and so it regenerates without a message on your screen. I tried deleting and modifying a few text lines to no avail.

Help would be greatly appreciated!

Also, please be very specific as I am a huge noob to Lua.

Closed as Not Constructive by evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?