This script is meant to make a gui come up if the answer in a text box is right or not. I have changed things around but it still does not work. No errors have came up both in the script and output, if possible please help:
I also have the script in the text box if that helps
This probably won’t be the solution, but you could put your answer variable in quotations
answer = "1939"
I tried it but it still dosent work thanks for the suggestion though.
Starter GUI is a child of the game and has no effect on what the player is currently visualizing. Instead, you would use a player’s PlayerGui. (Reference Link)
The script still does not work.
What is your current script now that it is edited? It’d be easier to send as a code block rather than an image.
Actually nvm I got it working thanks anyway I forgot to change the guis names stupidly…
Everything in starterGui gets copy to PlayerGui
Instead Trying using
local PlayerGui = game.Players.LocalPlayer.PlayerGui
local answer = 1393
PlayerGui.Correct.Enabled = true
PlayerGui.Wrong.Enabled = true
if PlayerGui.ScreenGui.TextBox.Text == tosring(answer) then
if not answer then
It does not matter if it is a local or global function because he defined it in the main scope.