#can someone help me with declaring value
1 messages · Page 1 of 1 (latest)
local player = Players.LocalPlayer
local kills = player.leaderstats.kills.Value
if you want to show every player kill on the server you have to do a different way
i only want it to show in output
Players:GetPlayers() is an array of all players
use a for loop
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = player:WaitForChild("leaderstats")
print(leaderstats.Kills.Value)
end)
Server script
The leaderstats folder doesn’t exist in the player you’re indexing, or the player itself doesn’t exist when you try to get the leaderstats from them
thanks i was looking for this