Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Updating Money GUI in filtering enabled?

Asked by 5 years ago

I'm still very new to filtering enabled, and what I'm trying to do is repeatedly update a GUI with a money value that's on the server side. This is what I have, but it only works in studio, and not in game.

This is in the server script service

game.ReplicatedStorage.MoneyEvent.OnServerEvent:connect(function(player)
    player.PlayerGui.MoneyGui.TextBox.Text = ("Money:" .. player.Money.Value)
end)

and this is in the gui

while true do
    game.ReplicatedStorage.MoneyEvent:FireServer()
    wait(1)
end

Sorry if both of these scripts are terrible, I'm just now learning how to use FE. Any and all help is appreciated. :)

1 answer

Log in to vote
0
Answered by
oftenz 367 Moderation Voter
5 years ago
Edited 5 years ago

You CAN'T access PlayerGui on the server. Keep client sided elements on the client.

Ad

Answer this question