--Make sure you make 2 bricks in workspace. 1 brick named "Brick1" and the other "Brick2". You can also add as many bricks as you want.
local regenTime = 45
local SpawnToBrickPos = {game.workspace.Brick1.CFrame, game.workspace.Brick2.CFrame} -- You can add more objects's cframe here.
local model = script.Parent
--model script
if model ~= workspace then
local backup = model:clone()
while true do
wait(regenTime)
model = backup:clone()
model.Parent = game.Workspace
model:makeJoints()
model.Torso.CFrame = SpawnToBrickPos[math.random(1,#SpawnToBrickPos)
end
else
error("!")
end
--I think I did this right. If I did. Your'e welcome. |