I need help with my leaderstats because it wont work when i kill a zombie or show up at all
Also could we see the script please?
? please tell more information
ya I’ve tried i got someone to try to help me yesterday but that didn’t work
…so you just repuploading the same topic?
so im trying to make a leaderboard that will show how many zombies you kill but my script does nothing
A script would be handy to see
local DataStoreService = game:GetService(“DataStoreService”)
local myDataStore = DataStoreService:GetDataStore(“myDataStore”)
game.Players.PlayerAdded:Connect(function(Player)
local leaderstats = Instance.new(“Folder”)
leaderstats.Name = “leaderstats”
leaderstats.Parent = Player
local Kills = Instance.new(“IntValue”)
Kills.Value = myDataStore:GetAsync(Player.UserId) or 0
Kills.Name = “Kills”
Kills.Parent = leaderstats
local Deaths = Instance.new("IntValue")
Deaths.Value = myDataStore:GetAsync(Player.UserId) or 0
Deaths.Name = "Deaths"
Deaths.Parent = leaderstats
local killStreak = Instance.new("IntValue")
killStreak.Name = "killStreak"
killStreak.Parent = Player
Player.CharacterAdded:Connect(function(character)
local humanoid = character:FindFirstChild("Humanoid")
humanoid.Died:Connect(function(died)
Deaths.Value = Deaths.Value + 1
killStreak.Value = 0
local tag = humanoid:FindFirstChild("creator")
local killer = tag.Value
if tag and killer then
killer.leaderstats:FindFirstChild("Kills").Value = killer.leaderstats:FindFirstChild("Kills").Value + 1
killer:FindFirstChild("killstreak").Value = killer:FindFirstChild("killstreak").Value + 1
end
end)
end)
so show it…
how do you expect I’ll help you without you showing the script
nvm
Can we see the script please? Got to write 30
what part of the script does not work
the hole thang its not doing anything that’s the problem its not showing how many zombies peoples killed and its also not showing up in the corner
This could be why, you’re assuming that there’s gonna be a tag.Value
already stored in the Zombie’s Humanoid perhaps so it may error as a result?
Do check your Output for any errors you may come across please, we can’t help you much with the situation unless you show some debugging issues
where do i put that at at the top ?
You need to change the folders name to leaderstats for ROBLOX to know that it is a leaderstats folder.
why do you need the data store reference if you not gonna use it?
ok thank you ill defiantly try that
He’s most likely going to finish the DataStore later on after getting the leaderstats to work.
where do i put local killer = tag.Value at because there’s multiple places i could put it
That’s what he did though
There’s a different issue at hand here I believe