Here is the code, it does not work and leaves this error: "Workspace.Script:7: attempt to index local 'Label' (a nil value)". How so is 'Label' nil?
--Server Script
RE = Instance.new("RemoteEvent")
RE.Name = "GuiChangeEvent"
RE.Parent = game.Workspace.Code.Events
RE.OnServerEvent:connect(function(Player, Label, Cash)
print(Cash)
Label.Text = "Coins: "..Cash
end)
--Local Script
Player = game.Players.LocalPlayer
Gui = Player.PlayerGui
RE = game.Workspace.Code.Events:WaitForChild("GuiChangeEvent")
Label = Gui:WaitForChild("CashLabelGui"):WaitForChild("Display")
Stats = Player:WaitForChild("Leaderboard"):WaitForChild("Currency")
Stats.Changed:connect(function(Change)
if Label then
RE:FireServer(Label, Stats.Value)
end
end)
halp pl0x
