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)

8 comments

0

What part exactaly isn't working?

0

I see some commented parts that shouldn't be commented out

0

When I type in the Code It should print Work But nothing happens

0

Do you type exactaly like it's written on the code?

0

Some Of the codes Appear Green in this Which shouldn't

0

That's a Scripting Helpers bug, it's not commented

0

When testing I Copied The Code To The Promocode To Make sure It is exactly the same

0

Did you tried adding a print out of the ifs, to check if it's being called?