You need to create function that resets your map and object inside of that map.
For example your function can work like: Parenting the Folder with the Builds inside of it, inside of ReplicatedStorage! Whenever Player joins by using PlayerAdded event and CharacterAdded event together, you can create a function and call a Reset() function in there, which will Parent the map to the ReplicatedStorage!
-- [Server Script] --
-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
-- Variables --
local Map_Folder = game.Workspace.Map_Folder
local function Reset()
Map_Folder.Parent = ReplicatedStorage
end
Players.PlayerAdded:Connect(function(Player) -- PlayerAdded Event Will Give Back The Player So We Can Use CharacterAdded After That
Player.CharacterAdded:Connect(function(Character) -- CharacterAdded Gives Back The Character
if Character then -- Check If Character Exists
Reset()
end
end)
end)
Hmm, not sure if this helps. I need a function that I can call in the middle of the game, that resets the map (or everything under workspace) and runs every script from the beginning. Just like what happens when you first load up a server.