Server-wide Gui script not working

Hello! I am trying to make a server-wide money system. I attempted this:

But I got “Money is not a valid member of PlayerGui “Players.Soccer_Cat20.PlaterGui”” (Line 3)

What should I replace with this code?

(This is a regular script in ServerScriptService)

i recommend u to use local scripts in the starter character scripts

But I need everyone to see the same thing, wouldn’t this make only one person see it that way?

No, it doesnt matter check itt

plr.PlayerGui:WaitForChild("Money"):WaitForChild("Frame"):WaitForChild("Bankmoney").Enabled = true

This might work, but if there’s an infinite yield on any of them, then change it to:

local playerGui = plr:WaitForChild("PlayerGui")
local money = playerGui:WaitForChild("Money")
local frame = money.Frame
local bankMoney = frame.Bankmoney
bankMoney.Enabled = true

Although, this wouldn’t work like @joso555 said. I’m just showing how you should use WaitForChild() in this cases. What I would do is use remote events and a local script to run this code. Here’s a guide on how to use them:

Hopefully this helps, but if you need additional help, I can answer any questions you have.

Well I believe setting a TextBox’s enabled property is not possible- Try this:

local Players = game:GetService("Players") -- The players service!

local function ChangeUI(Player)
    local success, catch = pcall(function() -- To catch errors, so the code will still run for anyone else who joins!
        Player.PlayerGui.Money.Frame.Bankmoney.Visible = true -- Setting the visibility to true!
        print("Success!") -- Debugging!

    return success

Players.PlayerAdded:Connect(function(Player) -- PlayerAdded event!
    local Success = ChangeUI(Player) -- Fire the function!
    local Yay

    if not Success then -- If it was unsuccessful, then retry until it is successful!
        repeat wait() Yay = ChangeUI(Player) until Yay == true -- Repeat the process until it was successful!
        print("Success!") -- Debugging!

-- Finished!
-- Enjoy! :)

Also, simply making the ScreenGui’s “ResetOnSpawn” property false will make sure when the player resets, the UI will stay the same!