Trying to make that text changes with button and gui is seen to players

  1. What do you want to achieve?
    Im trying to make a gui visible to every player.
    Gui is located in startergui

  2. What is the issue?


    In properties text changes but in game it not visible

  3. What solutions have you tried so far?
    Everything but i dont find a solution

1 Like

You’re editing the text on the client side.

If you’re planning to make it show up on all players, use a remote event. (Specifically, the :FireAllClients() function)

I guess lots of people have been there. First, every player has their own PlayerGui, you can’t edit a players interface through a server-sided script unless using a remote event/function.

Use :FireAllClients(), learn remote events.

And to edit a players interface use the following, not through “ServerScriptService”:

local player = game.Players.LocalPlayer
player.PlayerGui.ScreenGui.TextLabel.Text = "Example"
1 Like

So can the script stay in StarterGui or must it be moved to ServerScriptService

The script can stay, but you should use a Remote Event and change the text on the Server.

local Value1 = game.StarterGui.Points.Frame.AttValueText.Value
local Button = script.Parent
local replicatedStorage = game:GetService("ReplicatedStorage")
local removeEvent = replicatedStorage:WaitForChild("RemoteEvent")

 Button.MouseButton1Click:Connect(function()
	Value1.Value = 10     
	game.StarterGui.Points.Frame.AttValueText.Text = 10 
	remoteEvent:FireAllClients()
	remoteEvent.OnClientEvent:Connect(function()
		local Players = game:GetService("Players")
		local player = game.Players.LocalPlayer

		
		player.PlayerGui.Poits.Enabled = true
		
		player.PlayerGui.Points.Visible = true
	end)
end)

Sorry but that’s not how it works.

Please read more about remote events and client-to-server communication here.