Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to fix?

I been trying to make a passchar out of a TextBox, but I can not get to work.

if script.Parent.Text == "A" or "B" or "C" or "D" or "E" or "F" or "G" or "H" or "I" or "J" or "K" or "L" or "M" or "N" or "O" or "P" or "Q" or "R" or "S" or "T" or "U" or "V" or "W" or "X" or "Y" or "Z"or "a" or "b" or "c" or "d" or "e" or "f" or "g" or "h" or "i" or "j" or "k" or "l" or "m" or "n" or "o" or "p" or "q" or "r" or "s" or "t" or "u" or "v" or "w" or "x" or "y" or "z" then
script.Parent.Text = "*"

1 comment

0

Er, what you are doing is asking if it is EXACTLY A or B or exectra. I would love to answer right now, but it won't let me because I answered a question recently

1 answer

if script.Parent.Text == "A" or "B" or "C" or "D" or "E" or "F" or "G" or "H" or "I" or "J" or "K" or "L" or "M" or "N" or "O" or "P" or "Q" or "R" or "S" or "T" or "U" or "V" or "W" or "X" or "Y" or "Z"or "a" or "b" or "c" or "d" or "e" or "f" or "g" or "h" or "i" or "j" or "k" or "l" or "m" or "n" or "o" or "p" or "q" or "r" or "s" or "t" or "u" or "v" or "w" or "x" or "y" or "z" then

First of everything, with that statement, you will get an enormus headache...

It is wrong, an correct statemnt would kill you...

if script.Parent,Text == "A" or script.Parent.Text == "B" or script.Parent.Text = "C"

-- This is an correct if statement, which kills you.

But we can solve this with a table:

local t = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}

for i,v in pairs (t) do
	if script.Parent.Text == v then
	script.Parent.Text ="*"
end

1 comment

0

or an array

This discussion is preserved as it was. New answers, comments, and votes are closed.