sooooooooo I haven't done lua in a year so I'm a bit rusty and I'm curious why this doesn't work
01 | local button = script.Parent |
02 |
03 | local function onButtonActivated() |
04 | if script.Parent.Text = "Back" then |
05 | script.Parent.text = "Credits" |
06 |
07 | else |
08 |
09 | script.Parent.Text = "Back" |
10 | end |
11 | end |
12 |
13 | button.Activated:Connect(onButtonActivated) |
use this:
1 | local button = script.Parent |
2 |
3 | button.MouseButton 1 Click:Connect( function () |
4 | if script.Parent.Text = = "Back" then |
5 | script.Parent.Text = "Credits" |
6 | else script.Parent.Text = "Back" |
7 | end |
8 | end ) |