Error : attempt to index nil with 'Connect'
Local Script:
local BarPercent = script.Parent.Rank.Rank local Coins = script.Parent.Coins local Gems = script.Parent.Gems local Rank = script.Parent.Rank.TextLabel local plr = game.Players.LocalPlayer local x = require(game.ReplicatedStorage.BigNum) plr.stats.Rank.Value.Changed:Connect(function() print("Hello World!") end)
I think you meant:
plr:WaitForChild("stats").Rank:GetPropertyChangedSignal('Value'):Connect(function() print("Hello World!") end)
Use GetPropertyChangedSignal
https://developer.roblox.com/en-us/api-reference/function/Instance/GetPropertyChangedSignal
Properties have no events
Used WaitForChild in case it takes a while to load
Edit: Have no idea why a few letters of the code is cut out...
You will need to wait for the object to load. Try using a WaitForChild() instead.
plr:WaitForChild("stats"):WaitForChild("Rank").Value.Changed:Connect(function() print("Hello World!") end)
This isn't the best practice, but you get the point.