So I made a script that moves everything out of a folder to it's location. The problem is, is that when I play the game everything seems to go to it's location, but the GUI's from the folder go to StarterGui but don't show up... I really need help with this one XD!
Here is the code for locating the folders.
for _,i in pairs(game:GetService("Players"):GetPlayers()) do
i.CharacterAppearanceId = 0
i:LoadCharacter()
wait()
i.Character.Humanoid.Health = 0
wait()
i.Character:Remove()
wait()
i:LoadCharacter()
end
local rep = script.rep
wait(1)
for _, object in pairs(rep:GetChildren()) do -- this then gets rid of the folder
newObject = object
newObject.Parent = game.ReplicatedStorage
end
local work = script.work
wait(1)
for _, object in pairs(work:GetChildren()) do -- this then gets rid of the folder
newObject = object
newObject.Parent = game.Workspace
end
local gui = script.gui
wait(1)
for _, object in pairs(gui:GetChildren()) do
newObject = object
newObject.Parent = game.StarterGui
end
local sscript = script.sscript
wait(1)
for _, object in pairs(sscript:GetChildren()) do
newObject = object
newObject.Parent = game.ServerScriptService
end
local sstorage = script.sstorage
wait(1)
for _, object in pairs(sstorage:GetChildren()) do
newObject = object
newObject.Parent = game.ServerStorage
end
game.Players.PlayerAdded:Connect(function(Plr)
Plr.CharacterAppearanceId = 0
Plr:LoadCharacter()
wait()
Plr.Character.Humanoid.Health = 0
wait()
Plr.Character:Remove()
wait()
Plr:LoadCharacter()
local sound = script.Play
wait(5)
sound:Play()
end)

1 comment
Thank you so much!