Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I made an Admin script but the part where I put all scripts where they need to be isn't working?

Ok so I made an admin but this isn't working, I want script fixed directly please.

Script:

local RS = game.ReplicatedStorage
local SSS = game.ServerScriptService
local SS = game.ServerStorage
local SG = game.StarterGui

local ReplicatedStorage = script.ReplicatedStorage:GetChildren()
local ServerScriptService = script.ServerScriptService:GetChildren()
local ServerStorage = script.ServerStorage:GetChildren()
local StarterGui = script.StarterGui:GetChildren()

ReplicatedStorage.Parent = RS
ServerScriptService.Parent = SSS
ServerStorage.Parent = SS
StarterGui.Parent = SG

(The error its the they aren't changing the parents)

1 answer

✓ Accepted answer

You can't give a table a parent. But you can give every single item a parent.

local RS = game.ReplicatedStorage
local SSS = game.ServerScriptService
local SS = game.ServerStorage
local SG = game.StarterGui

local ReplicatedStorage = script.ReplicatedStorage:GetChildren()
local ServerScriptService = script.ServerScriptService:GetChildren()
local ServerStorage = script.ServerStorage:GetChildren()
local StarterGui = script.StarterGui:GetChildren()
for i, Part in ipairs(ReplicatedStorage) do
Part.Parent = RS
end
for i, Part in ipairs(ServerScriptService) do
Part.Parent = SSS
end
for i, Part in ipairs(ServerStorage) do
Part.Parent = SS
end
for i, Part in ipairs(StarterGui) do
Part.Parent = SG
end

If it timeouts, maybe add some wait() in the script.

1 comment

0

It worked perfectly! Thank you for the fast answer!

This discussion is preserved as it was. New answers, comments, and votes are closed.