I am trying to make a username button, and I'm not sure whats wrong with my script. I don't know if I messed up the colors or not.
if
script.Parent.Text.CaptainAlien132
and
MouseButton1Click:Connect(function()
script.Parent.Parent.UserEnter
then
script.Parent.Parent.UserEnter.BackgroundColor3 = "204, 255, 204"
script.Parent.Confirmed.Play()
end
if
script.Parent.Text = --Anything except my user I don't know how to do that part
and
MouseButton1Click:Connect(function()
script.Parent.Parent.UserEnter
then
script.Parent.Parent.UserEnter.BackgroundColor3 = "255, 89, 89"
script.Parent.Denied.Play()
wait(.2)
script.Parent.Parent.UserEnter.BackgroundColor3 = '54, 81, 81'
end
I am a bit of a noob, so please go easy on me!

4 comments
Hi could you explain to me what you are trying to achieve, so I can help you more clearly. Your code is confusing me a bit.
I want it so if my username is inputted and a button is pressed, the button plays a sound and turns pastel green. If anything but my username is inputted and pressed, it turns persimmon and the color lasts for .2 seconds and also plays a sound. Sorry if this is confusing too, I'm bad at explaining stuff..
I like your attempt, but your code is really confusing and has lots of errors. You’re missing some stuff, functions are in conditional statements, and the white spacing looks weird. I might completely remake your script but not now.
Thank if you could, I wouldn't mind when it gets done because it isn't my top priority. Thanks for helping though!