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

How can I fix coding my currency for a game ?

Asked by 2 years ago
Edited 2 years ago

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

0
Can you post the whole script because the one you posted is kinda confusing to understand HeadZlear 0 — 2y
0
Yes, we need more context. ashk3000 32 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

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)
Ad

Answer this question