model = script.Parent.Parent
backup = model:clone()
enabled = true
function regenerate()
local p = script.Parent.Position
model:remove()
model = backup:clone()
model.Parent = game.Workspace
model.Position = p
model:makeJoints()
message.Parent = nil
enabled = false
wait(30)
enabled = true
end
end
function onHit(hit)
if (hit.Parent:FindFirstChild("Humanoid") ~= nil) and enabled then
regenerate()
end
end
script.Parent.Touched:connect(onHit)
its suppose to create the copy at the place the buttom is exacly same time as you push the buttom
I just creates the copy from where the buttom stood when the server started |