Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I fix coding my currency for a game ?

I had a huge problem with a coding with this

local player = game.Players.LocalPlayer

player.WaitForChild("Currency").Changed:connect(function(val) script.Parent.Currency.Text = val end)

script.Parent.Currency.Text = "$". .Player:WaitForChild("Currency").Value

2 comments

0

Can you post the whole script because the one you posted is kinda confusing to understand

0

Yes, we need more context.

1 answer

In serverscriptservice put this it might help just let me know.

local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	local cash = Instance.new("IntValue")
	cash.Name = "$"
	$.Value = 100
	$.Parent = leaderstats
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.