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

Script for GUI coin counter isnt working despite no errors?

Asked by 4 years ago
Edited 4 years ago

This script is inside a textlabel inside a ScreenGUI inside starter gui. There is a other script the successfully makes a value called Coins. However, this script is not effecting the Textlabel at all. Any help?

local Player = game.Players.LocalPlayer
local Coins = Player.leaderstats:WaitForChild("Coins")

script.Parent.Text = "Coins: " ..Coins.Vaule

Coins:GetPropertyChangedSignal("Vaule"):Connect(function()
    script.Parent.Text = "Coins: " ..Coins.Vaule
end)
0
Is the script inside a localscript? If not, then it won't work properly, also value is spelled incorrectly. Retr0Thief 104 — 4y

1 answer

Log in to vote
1
Answered by
JakyeRU 637 Moderation Voter
4 years ago
Edited by User#24403 4 years ago

Hello,

You put Vaule instead of Value. I have remade your script.

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Coins = LocalPlayer:WaitForChild("leaderstats").Coins
script.Parent.Text = "Coins: " ..Coins.Value
Coins:GetPropertyChangedSignal("Value"):Connect(function()
    script.Parent.Text = "Coins: " ..Coins.Value
end)
Ad

Answer this question