Hello, I'm trying to make things with a GUI and it is not letting me change the text with a script. I made a little button that makes the text change when clicked and it should change, but it does not.
script.Parent.MouseButton1Click:Connect(function() script.Parent.Text = "hello" end)
Any help would be greatly appreciated!!!
Use a local script instead of a script. Scripts run on the server while local scripts run on the client. If you're using a local script, ensure the script is not disabled.
script.Parent.MouseButton1Click:Connect(function() for _,p in pairs(game.Players:GetPlayers()) do p.PlayerGui.ScreenGui.TextButton.Text = "hello" end end)
You don't need a LocalScript to accomplish this.