I want to have it so when I press a button a TextLabel changes, this is the code I've came up with but it doesn't work.
local player = game.Players.LocalPlayer
local text = player.PlayerGui.GunPick.Screen.LoadoutInfo.ChangeableInfo.Primary.Text
local button = script.Parent
button.MouseButton1Click:Connect(function()
text = "Martini Henry"
end)
It doesn't give out any output errors or Script Analysis errors.

1 comment
This is put in a LocalScript inside the button.