Hi. I’ve written a simple script and for some reason it only works when you run it - it doesn’t work when there is a player in the server. As I’m quite new to lua, I have no idea on how to fix it and would appreciate if someone could help.
Here’s the script:
local starter = gui.StarterScreen
local secondary = gui.SecondaryScreen.RequirementText.RuleText
local secT = secondary.Title
local secR = secondary.Reqs
local startI = starter.Images
local startT = starter.Text
local waitI = game:GetService("StarterGui").ScreenGui.wait
local waiting = {"PLEASE WAIT.","PLEASE WAIT..","PLEASE WAIT...","hi","hiw","hi"}
for i, v in pairs(waiting) do
wait(1)
waitI.Text = "PLEASE WAIT."
wait(1)
waitI.Text = "PLEASE WAIT.."
wait(1)
waitI.Text = "PLEASE WAIT..."
end
print("hi")
waitI.Text = "APPLICATION LOADED"
wait(3)
gui.StarterScreen:Destroy()
waitI:Destroy()
wait(1)
secondary.Title.b.Visible = true
wait(1)
secondary.Title.a.Visible = true
wait(3)
secondary.a.Visible = true
secondary.b.Visible = true
wait(2)
secondary.Title.a.Visible = true
wait(1)
secondary.Title.b.Visible = true
wait(4)
secondary.Reqs.bc.Visible = true
wait(3)
secondary.Reqs.CRIM.Visible = true
wait(3)
secondary.Reqs["13"].Visible = true
wait(3)
secondary.Reqs.sc.Visible = true
wait(3)
secondary.Reqs["50"].Visible = true
wait(3)
gui.SecondaryScreen:Destroy()
local phase = gui.PhasesScreen
local title = phase.Title
local phaseA = phase.Phases
title.b.Visible = true
wait(2)
title.a.Visible = true
wait(2)
phaseA.phaseA.Visible = true
wait(1)
phaseA.phaseB.Visible = true
wait(1)
phaseA.phaseC.Visible = true
wait(1)
phaseA.phaseAinfo.Visible = true
wait(4)
phase:Destroy()
wait(1)
game:GetService("StarterGui").ScreenGui:Destroy()```