Advertisement
Sebastian_Ayala

Regenerate model script (For ROBLOX)

Sep 15th, 2016
1,639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. Model regeneration:
  2. local regenTime = 180 -- Put the time (In seconds)
  3. local messageTime = 2.5
  4.  
  5. local model = script.Parent
  6. local message = Instance.new("Message")
  7.  
  8. --Put the script into the model
  9. if model ~= workspace then
  10. message.Text = "Regenerating " .. model.Name
  11.  
  12. local backup = model:clone() -- Put the model name
  13.  
  14. while true do
  15. wait(regenTime)
  16.  
  17. --Put again the model name
  18. model:Destroy()
  19.  
  20. --Show the message
  21. message.Parent = game.Workspace
  22. wait(messageTime)
  23. message.Parent = nil
  24.  
  25. --Put AGAIN the model name
  26. model = backup:clone()
  27. model.Parent = game.Workspace
  28. model:makeJoints()
  29. end
  30. else
  31.  
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement