local RS = game:GetService("ReplicatedStorage")
local remote = RS:WaitForChild("CurrencyIndicator")
remote.OnClientEvent:Connect(function(bronzevalue)
script.Parent.Text = bronzevalue
end)
this is the local script for it
local RS = game:GetService("ReplicatedStorage")
local currencyremote = RS:WaitForChild("CurrencyIndicator")
local bronzecoin = "BronzeCoin"
local silvercoin = "SilverCoin"
game:GetService("Players").PlayerAdded:Connect(function(player)
local folder = Instance.new("Folder")
folder.Name = "CurrencyFolder"
folder.Parent = player
local bronzevalue = Instance.new("IntValue")
bronzevalue.Name = bronzecoin
bronzevalue.Parent = folder
local silvervalue = Instance.new("IntValue")
silvervalue.Name = silvercoin
silvervalue.Parent = folder
while true do
wait(1)
bronzevalue.Value = bronzevalue.Value + 10
end
local function onChanged()
if bronzevalue.Value > 100 then
bronzevalue.Value = bronzevalue.Value - 100
silvervalue.Value = silvervalue.Value + 1
end
currencyremote:FireClient(player,bronzevalue,silvervalue)
end
bronzevalue.Changed:Connect(onChanged)
end)
so this is my server script and im trying to send the bronzevalue to a local script in StarterGui but for some reason it isnt working and the bronzevalue isnt turning into silvervalue either

5 comments
It doesn't seem to be occurring errors, maybe provide the local script's code.
there i edited it
any code underneath the while loop will not run, place onChanger() above the while loop, im not sure if that applies to functions that are called out side of the while loops scope but i know it does for regular codes and if statements. also send your stuff to PlayerGui instead. everything thats in starter gui will be replicated to player gui when the game starts so if you're looking to change stuf
im not sending it directly there its requiered by a remote event so it will be able to change in game also mb havent scripted in a while so i forgot abt the while loop soz ty tho
I edited my answer, hope it helps.