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

I Don't Know Whats Wrong With My Script For a Promocode System?

Asked by 4 years ago
Edited 4 years ago

Please encode Lua code in the Lua block code tag (look for the Lua icon in the editor).

I Am trying to make a Promocode System and I Have a script that controls all of it but it isn't working

--[[Variable]]--
local PM = script.Parent.PromoMenu
local PC = script.Parent.PromoCodes
local PI = PM.PromoInsert
--[[Scripting]]--
script.Parent.PromocodesOpen.MouseButton1Click:Connect(function()
    if PM.Visible == false then
        PM.Visible = true
    else
        PM.Visible = false
    end
end)

PM.Submit.MouseButton1Click:Connect(function()
    if PI.Text == "C0VID19" then
        print("Work")
    end


    if PI.Text == "Ca3h" then
        print("Work")
    end

    if PI.Text == "M0therL0ad" then
        print("Work")
    end
end)
0
What part exactaly isn't working? Leamir 3138 — 4y
0
I see some commented parts that shouldn't be commented out marine5575 359 — 4y
0
When I type in the Code It should print Work But nothing happens Magicdevice3 58 — 4y
0
Do you type *exactaly* like it's written on the code? Leamir 3138 — 4y
View all comments (4 more)
0
Some Of the codes Appear Green in this Which shouldn't Magicdevice3 58 — 4y
0
That's a Scripting Helpers bug, it's not commented Leamir 3138 — 4y
0
When testing I Copied The Code To The Promocode To Make sure It is exactly the same Magicdevice3 58 — 4y
0
Did you tried adding a print out of the ifs, to check if it's being called? Leamir 3138 — 4y

Answer this question