I am trying to change a number value with a script. Can someone please help me? This is what I have now:
script.Parent.MouseButton1Click:Connect(function() game.StarterGui.Frame.TextButton.Text = game.Workspace.Number.Value end)
What is wrong with this script??
To edit a GUI, you have to call PlayerGui from the player, not the StarterGui
PlayerGui
clones out of StarterGui
every respawn if ResetPlayerGuiOnSpawn
is set to true
. So, if you edit something in StarterGui
, it won’t show until you reset.GuiObject
s are in. If you edit a property from a GUI in PlayerGui
, it will show right away, as this is the live GUI.script.Parent.MouseButton1Click:Connect(function() game.Workspace.Number.Value = YOUR NUMBER HERE end)