So im trying to reduce lag by adding a section to settings where you can remove other players bases… However I am not sure how to put them back…
Code:
wait(4)
local base = game.Players.LocalPlayer.PlayersBase.Value
local base1 = game.Workspace.Base1
local base2 = game.Workspace.Base2
local base3 = game.Workspace.Base3
local base4 = game.Workspace.Base4
script.RemoveBases.Event:connect(function()
if base ~= base1 then
base1:Destroy()
end
if base ~= base2 then
base2:Destroy()
end
if base ~= base3 then
base3:Destroy()
end
if base ~= base4 then
base4:Destroy()
end
end)
script.Add.Event:connect(function()
local bases = game.ReplicatedStorage.GetBases:InvokeServer()
local base1v = bases.Base1
local base2v = bases.Base2
local base3v = bases.Base3
local base4v = bases.Base4
if base ~= base1v then
base1v:Clone().Parent = workspace
end
if base ~= base2v then
base2v:Clone().Parent = workspace
end
if base ~= base3v then
base3v:Clone().Parent = workspace
end
if base ~= base4v then
base4v:Clone().Parent = workspace
end
end)
You can just store the locations of the bases before you remove them and then just move the base back to that stored location when you are adding them back.
That’s a whole another issue. I’m trying to help with simply placing the base back. Try firing a remote event to update the other bases that are currently being shown whenever a base is updated. I think there’s a better way of doing it but you can at least try it.