I'm making a script in which that if I click a button it subtracts by one but if it is already selected it and you click it it will add it back I want to make the button change its name to and from "Select" and "Selected" without showing it on other clients I've gotten it to subtract the one and change the name of the button (but it does it for everyone in the server) I tried making it so if the name of the button is "Selected" and it is clicked it will add but if its name is "Select" it will remove it and change the name to "Selected" How would I go about this?
COMMUNITY QUESTION
How to change the name of button for one person?
2 answers
local Boolean = false
TextButton.MouseButton1Click:connect(function()
Boolean = not Boolean
if Boolean == false then
TextButton.Name = "Select"
elseif Boolean == true then
TextButton.Name = "Selected"
end
end)
Simple! Just make it a Local Part. Here's the Wiki page on that: http://wiki.roblox.com/index.php?title=Local_parts
Here's an example:
-- Put this in a Local Script you can put this in StarterGui or StarterPack
for i,v in pairs(game.Lightning.LocalParts:GetChildren)do -- I made a folder that holds all my Local Parts named "LocalParts" in lightning
v:Clone().Parent = game.Workspace.Camera
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Hello, I put it inside a local script still nothing. What can I do?
I added an example script. Let me know if that helped!