ive made a welcome gui with a button that makes all the other guis and tools appear, however only the tools do not appear after the button is pressed, how can i change the script so they’ll show up after the button is pressed?
Explorer tab
the script im using:
local Sui = script.Parent.Parent.Parent
local close = script.Parent
local buttons = script.Parent.Parent.Parent.Parent.Buttons
local sp = game:GetService("StarterPack")
local toolContainer = sp.toolContainer
close.MouseButton1Click:connect(function()
Sui:Destroy()
wait(1)
for _, tool in ipairs(toolContainer:GetChildren()) do
tool.Parent = nil
end
for _, tool in ipairs(toolContainer:GetChildren()) do
tool.Parent = sp
end
buttons.Enabled = true
end)
I think it is because you’re putting the tools in the starterpack and not the backpack?
OR maybe it could be that you’re deleting Sui so the code gets destroyed ?
Try this:
local Sui = script.Parent.Parent.Parent
local close = script.Parent
local buttons = script.Parent.Parent.Parent.Parent.Buttons
local backpack = game.Players.LocalPlayer:WaitForChild("Backpack")
local toolContainer = game.ReplicatedStorage.toolContainer -- put the toolContainer thing in game.ReplicatedStorage
close.MouseButton1Click:connect(function()
--Sui:Destroy() for now without this
wait(1)
for _, tool in ipairs(toolContainer:GetChildren()) do
tool.Parent = backpack
end
buttons.Enabled = true
end)
Let me know if it worked, and if not what error did you get and what is happening.