Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

ClickDetector script doesn't have error but doesn't function the way I want can someone help?

Asked by 4 years ago
Edited 4 years ago

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

01-- Locals:
02local ClickDetector = script.Parent
03 
04ClickDetector.MouseClick:Connect(function(Player)
05    local TextGui = Player.PlayerGui:FindFirstChild("TextGui")
06    local Configurations = TextGui.Configuration
07    if Configurations.Value3.Value == false then
08        if Configurations.Value2.Value == true then
09            TextGui.Frame.Visible = true
10            TextGui.Frame.GeneratedText.Text = "Text."
11        else
12            print("Can't Skip")
13        end
14    else
15        print(Player.Name.." Already Opened")
16    end
17end)

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

0
This is not the entire script, we don't know how was "Player" defined, there isn't even the .MouseClick event of ClickDetector. User#32819 0 — 4y
0
Oh my bad i send the wrong thing hzesbemad 24 — 4y
0
There its updated is that better to understand? hzesbemad 24 — 4y
0
Hmm, what changes "Configurations.Value3"? User#32819 0 — 4y
View all comments (4 more)
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 hzesbemad 24 — 4y
0
Try merging the line 7 and 8, put 'and' between them. Gabe_elvin1226aclan 323 — 4y
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 hzesbemad 24 — 4y
0
Ohh I found out my problem I didn't include Value3, Value4, Value5 in my gui thanks for the help tho appreciate it hzesbemad 24 — 4y

Answer this question