local Player = game.Players:FindFirstChild(script.Parent.Parent.Parent.Name)
while wait(0.1) do
print(Player.PlayerGui.Menus.Premium.Main.ScrollingFrame.YourULTRA.RGB.OnQ.Value)
end
How do i get the UI on the client?
When the ‘OnQ’ value is changed on the client this still prints true
You can shorten the script by using Players.LocalPlayer, it’s also best practice to define your services instead of directly indexing them from game. Calling them using the :GetService() method also ensures that the service is started before use.
Please also ensure that you are using a local script because the server will not see any changes made by the client.
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer.PlayerGui or LocalPlayer:WaitForChild("PlayerGui")
-- Continue defining variables for UI, etc.
If the OnQ value is changed on client it doesn’t get replicated to server. If it’s printing the value without erroring then the problem is within setting the value, not accessing it.
If you want a server-sided check on a client’s user interface, you’ll need to use a RemoteFunction to send a request from the server, make the client receive and process the request, and then send back the requested information to the server.