Hey
So i just started to create my game and im kinda new to roblox studio can somebody help me with this code its from chat gpt
-- LocalScript în StarterPlayerScripts
local player = game.Players.LocalPlayer
local gui = player:WaitForChild("PlayerGui"):WaitForChild("CurrencyUI")
local coinsFrame = gui:WaitForChild("CoinsFrame")
local gemsFrame = gui:WaitForChild("GemsFrame")
local coinText = coinsFrame:WaitForChild("CoinText")
local gemText = gemsFrame:WaitForChild("CoinText")
local coins = 100
local gems = 10
local function updateUI()
coinText.Text = tostring(coins)
gemText.Text = tostring(gems)
end
_G.AddCoins = function(amount)
coins += amount
updateUI()
end
_G.AddGems = function(amount)
gems += amount
updateUI()
end
updateUI()
Im trying to make a money system and a gem one but when i type the command to give me coins it doesnt work
** You are now Level 1! **