Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I fix this local script in a GUI text button?

Asked by 5 years ago

In a local script in TextButton.

function onButtonActivated()
    script.Parent.Parent.Enabled = false
    game.StarterGui.Weapons.Enabled = true
end
script.Parent.Activated:Connect(onButtonActivated)

The first part works but not the second. can you please help?

0
What I mean is that it will close the GUI but not open the second one. SamZeKat 28 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
game.StarterGui

Is not the local players gui you would need to do

game.Players.LocalPlayer.PlayerGui.Weapons.Enabled = true
Ad

Answer this question