1 | function clicked() |
2 | game.StarterGui.ScreenGui.Frame.Mes.Text = "<efgde" |
3 | end |
4 | script.Parent.MouseButton 1 Down:connect(clicked) |
Trying to make this script work, but it wont change the TextLabel(Mes) to efdge I have tried this in both a regular script and a localscript.
If you want an immediate change, use PlayerGui, as StarterGui will just change the gui when you 'reset'.
Here's how you would do it in a LocalScript:
1 | local plrgui = game.Players.LocalPlayer.PlayerGui |
2 |
3 | if plrgui ~ = nil then --Just in case the player clicks too soon |
4 | plrgui.ScreenGui.Frame.Mes.Text = "<efgde" |
5 | end |
And in a Click script:
1 | script.Parent.MouseButton 1 Down:connect( function () |
2 | local plrgui = game.Players.LocalPlayer.PlayerGui |
3 |
4 | if plrgui ~ = nil then --Just in case the player clicks too soon |
5 | plrgui.ScreenGui.Frame.Mes.Text = "<efgde" |
6 | end |
7 | end ) |
If this helped please accept the answer :)