So I'm working on a loading screen, but when the "Play" button opens, if i click it, it does absolutely nothing.
local button = game.StarterGui.Loading.Frame.TextButton
local function onClick()
if game.StarterGui.Loading.Frame.Loaded.Value == true then
game.StarterGui.Loading.Enabled = false
end
end
button.MouseButton1Click:Connect(onClick)
It looks like the "Loaded" Value isn't changing either.
Value is a boolValue, and here's the script to change it.
Button = game.StarterGui.Loading.Frame.TextButton
Gui = game.StarterGui.Loading
Value = game.StarterGui.Loading.Frame.Loaded.Value
Value = false
Gui.Enabled = true
script.Parent.Text = ("Loading...")
wait(math.random(1, 10))
Value = true
script.Parent.Text = ("Play")

2 comments
Tried it, got this: Players.Roblozinko.PlayerGui.Loading.Frame.TextButton.Script:3: attempt to index nil with 'WaitForChild'
@roblozinko try checking your explorer to see if there's actually a thing called "loading"