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

-- 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

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