I want to know how to make it so the script waits for the reset button to load and then disable it.
Right now if the script loads before the reset button then it crashes the entire script which breaks my map loading code as well which means I just stay in my test map.
Strangely this only happens in roblox beta player
Script
--Variables
local player = game.Players.LocalPlayer
local GUI = player:WaitForChild('PlayerGui'):WaitForChild('ScreenGui', math.huge)
local bootup = GUI.boot_up_screen
local main_menu = GUI.main_menu
local children = game.Workspace.maps:GetChildren()
local loaded_map = script.Parent.loaded_map
local Blur = game.Lighting.Blur
local functions = require(game.Players.LocalPlayer.PlayerScripts.local_functions);
game.StarterGui:SetCore('ResetButtonCallback', false)
GUI.boot_up_screen.Visible = true
GUI.main_menu.Visible = true
for i = 1, #children do
local child = children[i]
if child:IsA("Folder") then
child.Parent = game.ReplicatedStorage.local_map_storage
loaded_map.Value = "none"
end
end
game.ReplicatedStorage.local_map_storage.none.Parent = game.Workspace.maps
functions.load_map("default_bunker", 40.659, -24.339, -558.835, 0,-180,0, false, "Test Map 1", "Do not enter unless told to do so otherwise you will pay", Color3.new(255,255,255))
wait (2)
for i = 0,20,1 do
bootup.TextLabel.TextTransparency = bootup.TextLabel.TextTransparency + 0.05
wait (0.01666666666)
end
wait (0.1)
for i = 0,10,1 do
bootup.Transparency = bootup.Transparency + 0.1
wait (0.01666666666)
end
wait(0.5)
----show the menu------
main_menu.show_menu.Value = true
Blur.Enabled = true
for i = 0,12,1 do
Blur.Size = Blur.Size + 1
wait (0.01666666666)
end