So I'm making a game and I'm not sure, but I made a Clickdetector put in a script inside it and made a script

-- Locals:
local ClickDetector = script.Parent

ClickDetector.MouseClick:Connect(function(Player)
	local TextGui = Player.PlayerGui:FindFirstChild("TextGui")
	local Configurations = TextGui.Configuration
	if Configurations.Value3.Value == false then
		if Configurations.Value2.Value == true then
			TextGui.Frame.Visible = true
			TextGui.Frame.GeneratedText.Text = "Text."
		else
			print("Can't Skip")
		end
	else
		print(Player.Name.." Already Opened")
	end
end)

When Value3 is false then it works but when it goes to value2 it says cant skip even tho its true could anyone help me? if you need me to explain more then comment

My bad I sent the wrong script without ClickDetector.MouseClick

8 comments

0

This is not the entire script, we don't know how was "Player" defined, there isn't even the .MouseClick event of ClickDetector.

0

Oh my bad i send the wrong thing

0

There its updated is that better to understand?

0

Hmm, what changes "Configurations.Value3"?

0

The Configurations.Value3 is game.Players.LocalPlayer.PlayerGui.TextGui.Configurations.Value3 its there it isnt a folder it is that Configuration thingy if you know what i mean

0

Try merging the line 7 and 8, put 'and' between them.

0

I did if Configurations.Value2.Value == true and Configurations.Value3.Value == false then now and it skips it and just goes to that the player already opened it

0

Ohh I found out my problem I didn't include Value3, Value4, Value5 in my gui thanks for the help tho appreciate it