Everthing works perfect only when i will add an gui before game shutdown it wont works. Whats wrong?
script.Parent = nil
local MPS = game:GetService("MarketplaceService")
local Current_Version = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Updated
print("Updater:[CURRENT_SERVER_VERSION: "..Current_Version.."]")
function CheckLoop()
while wait(1) do
local N_Version = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Updated
if N_Version ~= Current_Version then
print("Updater:[Update found, Creating new server]")
CreateNewServer()
end
end
end
for i,v in pairs(game.Players:GetPlayers()) do --Not working
a = script:findFirstChild("Lold"):Clone()--Not working
a.Parent = (v:FindFirstChild("PlayerGui") or v.Character)--Not working
end--Not working
function CreateNewServer()
while wait() do
for i,v in pairs(game.Players:GetPlayers()) do
local d = script.NewServer:clone()
d.Parent = (v:FindFirstChild("PlayerGui") or v:FindFirstChild("Backpack") or v.Character)
end
end
end
CheckLoop()
