So I was remaking a Coinflip for a Clicker game into just a normal game! But it wont update the bux!
local remotes = game.ReplicatedStorage
remotes.Coinflip.OnServerEvent:Connect(function(plr,bet,result)
local bux = game.StarterGui.GameGUI.bux.buxAmount.Value
if bux >= bet and bux > 0 then
if result == "win" then
bux = bux + bet;
game.StarterGui.GameGUI.bux.Visible = false
game.StarterGui.GameGUI.bux.Text = bux
game.StarterGui.GameGUI.bux.buxAmount.Value = bux
wait(0.05)
game.StarterGui.GameGUI.bux.Visible = true
print(plr.Name .. " JUST WON!")
else
bux = bux - bet;
game.StarterGui.GameGUI.bux.Visible = false
game.StarterGui.GameGUI.bux.Text = bux
game.StarterGui.GameGUI.bux.buxAmount.Value = bux
wait(0.05)
game.StarterGui.GameGUI.bux.Visible = true
print(plr.Name .. " JUST LOST!")
end
end
end)

4 comments
i need help with this too
You're changing the startergui, that won't affect anything other than the GUI player's spawn with...you will only be capable of changing a player's GUI via a localscript
I strongly disagree. I have done so with a normal script and am using it for another game.
you might disagree but Vulkarin is correct