How can i make the button color when they are clicked?

Hi i already have an full working menu GUI with tabs

Im just wondering if any scripter developer here could help me
How can i turn this tabs button into a color when they are pressed?

image

script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Divisions.Visible = true
script.Parent.Parent[“FRAME 1”].Visible = false
script.Parent.Parent[“FRAME 2”].Visible = false
script.Parent.Parent.TITLE.Visible = false
script.Parent.Parent.TITLE2.Visible = false
script.Parent.Parent.TITLE3.Visible = false
script.Parent.Parent.Deploy.Visible = false
script.Parent.Parent.MAINTITLE.Visible = false
script.Parent.Parent.Division.Visible = true
script.Parent.Parent.Subdivisions.Visible = false
wait(0.1)
end)

This is my script of the button
Its like tabs menu where u change to another menu and menu

What i want to get is how can i make the button change color when they are clicked?

For example
I click button 1 - show up blue
The rest button is white

3 Likes

You’ll need to change its BackgroundColor3 property to change its color

1 Like

Do u know what i mean?
or do u need screenshot

1 Like

A screenshot would be helpful or an example of what you’d like it to do

1 Like

image

this is from google so i want like this

like when u click each button it will show up their color and this little thingy line

This is what you need to do when the button is clicked:

  • If a previous button was clicked, change its text color back to default and remove its line
  • Change the TextColor3 property to the color you’d like
  • Add a Gui with the line to the button, but make sure it has a higher ZIndex than the one the button uses so the line is visible

Do u have any video or tutorial to do this?
do u need my discord user

I’ll make an example for you and will update the reply when I’m done

Send screenshot if u can? or video

Here’s the place file with a working example: ButtonColorExample.rbxl (58.6 KB)

hey i have an issue about one of my script if u could help me?

What’s the issue you’re experiencing?

When i equip my gun tool while crouching
it float me in air
is this crouch issue script or gun script?

I think the issue is happening because of the crouch script, not the gun script

May i review u the crouch script
if u dont mind

I’m willing to help you with this problem, but I recommend making a new topic for it since it’s a different problem than the one in this topic

Can we talk this on discord instead?
i dont wanna keep spamming topic

I don’t have a Discord account unfortunately

It won’t be spam if you make a topic about a genuine issue you’re experiencing

Alr i will make a new post now

try check if u can

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.