So I was working on a Stats Gui for the player to see how many kills and how much EXP they have. I'm not sure what I scripted was correct and I can't seem to define the variable for kills. So can I be assisted?
local player = game.Players.LocalPlayer
local kills = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Kills
kills.Changed:connect(function()
if player:FindFirstChild('leaderstats') then
script.Parent.Text = 'Kills: ' .. kills.Value
end
end)
Here're some screenshots I took to show you, https://gyazo.com/ac32de91f85833b48944abbe4fa72d26 https://gyazo.com/14df459ffd8e5763d8e7a23461c8c8f2

1 comment
replace script.Parent.Parent.Parent.Parent.Parent.leaderstats.Kills with game.Players.LocalPlayer:WaitForChild("leaderstats"):FindFirstChild("Kills").