Hello, as you may as guessed I need help with a script. It should make other stuff disappear when a player types in "war" in it. Please help!
Here is the script I've done. (its not working.)
if script.Parent.Text == "war" or "War" then script.Parent.Visible = false script.Parent.Parent.replyinform.Visible = false script.Parent.Parent.ctc.Visible = true script.Parent.Parent.replyingtext1.Visible = true end
Thanks!
Here is the correct script. Your error is on line 1. You're saying if the text box's text is equal to "war" or just randomly say "War". Lua does not interpret it like that. You must repeat what you said. If this is not explained well, I'll explain in the script. Make sure it's Local
script.Parent.Changed:Connect(function(prop) -- every time the textbox changes. if script.Parent.Text == "War" or script.Parent.Text == "war" then -- this is what i meant by how lua interprets things. you have to specify what the "or" is. what your current script says is, if the text is equal to war, or just an unspecified string is there. like what does "war" alone mean? the program doesn't know. -- Do code. end end)
I'll just replace your script here.
script.Parent:GetPropertyChangedAsync("Text"):Connect(function() if script.Parent.Text == "war" or "War" then script.Parent.Visible = false script.Parent.Parent.replyinform.Visible = false script.Parent.Parent.ctc.Visible = true script.Parent.Parent.replyingtext1.Visible = true end end)