I know this may sound like a trivial issue but I’ve got a TextLabel that I need to be the value present in an Int value which is stored in the Player (Not in StarterGui, StarterScripts etc.)
Here is what I already have:
GUIValue = script.Parent
local player = game.Players.LocalPlayer
local Attack = player:WaitForChild("Attack")
GUIValue.Text = player:WaitForChild("Attack")
GUIValue = script.Parent
local player = game.Players.LocalPlayer
local Attack = player:WaitForChild("Attack")
GUIValue.Text = player:WaitForChild("Attack").Value
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Attack = Player:WaitForChild("Attack")
local Label = script.Parent
Attack.Changed:Connect(function(Value)
Label.Text = Value
end)
You’re using the deprecated :connect(), use :Connect() instead. Additionally, you don’t need to call WaitForChild() on an instance multiple times.