|
I am working on a game where you survive the flood but I've ran into a problem. It is made, so when the flood touches a part, all it's joints break. That works but the issue is, that when a copy of the map from the server storage is made, the welds don't hold together and the whole thing falls apart, before the flood even comes. If you know what causes this and how to fix it please tell me.
The place: https://www.roblox.com/games/1136987535/Survive-the-flood
The script that makes a copy of the map:
local map = game.ServerStorage.BuildingMap
local roundStartTime
local gameTakesSeconds = 30
local intermissTakesSec = 10
local flood = game.Workspace.flood
local ySize = 2
local function flooding()
wait(10)
while ySize < 40 do
yS##### #S##### #.3
flood.Size = Vector3.new(200, ySize, 200)
print(ySize)
wait(0.1)
end
wait(1)
flood.Size = Vector3.new(200, 2, 200)
ySize = 2
end
local function initialize() -- This is the function that makes the copy
local mapCopy = map:Clone()
mapCopy.Name = "MapCopy"
mapCopy.Parent = game.Workspace
roundStartTime = tick()
flooding()
end
local function cleanup()
game.Workspace.MapCopy:Destroy()
end
while true do
initialize()
repeat
local currentTime = tick()
local timeSinceGameStarted = currentTime - roundStartTime
wait(0.25)
print(timeSinceGameStarted)
until timeSinceGameStarted > gameTakesSeconds
cleanup()
wait(intermissTakesSec)
end |