I'm trying to make a selection GUI that will change an image and text at the same time, but nothing happens when the button is clicked.
local bu = script.Parent
local value = 1
local text = script.Parent.Text
local phone = script.Parent.Parent.PhoneTemplate.Image
bu.MouseButton1Down:connect(function()
value = 1 + 1
if value == 3 then
value = 1
end
end)
value.Changed:connect(function()
if value == 1 then
text = "Button Style (1/3)"
phone = "rbxassetid://1995879731"
if value == 2 then
text = "Button Style (2/3)"
phone = "rbxassetid://1996485774"
if value == 3 then
text = "Button Style (3/3)"
phone = "rbxassetid://1996484171"
end
end
end
end)
Thanks if you can help!

3 comments
Do you mean value = value+1? Because otherwise value will always be 2
I changed it to value = value + 1
You have two problems