I am making a piggy game but the folders locate themselves, this is the what the script looks like.

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.PlayerGui --edited location
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)

The only thing that locates is the ReplicatedStorage and Workspace.

-Here is what it looks like in the studio.

https://ibb.co/BBYCwWx

-Here is what it looks like in game.

https://ibb.co/WcYmyk5

Thanks in advance!