dont make a new one there is already one only the kill script
Also, check the other thread you made about the same issue, i forgot to go here again to tell you some plausible issues that caused this, i also explained about your kill creator value not going to work.
Edit: mind the other stuff i said about end) closing cause i forgot
No my meaning is it would be weird because my datastore 2 made a stat for gold already while my other one is already anotehr so it would lag both of them
i know so you dont make a new leaderstat use the already eexistent one
Okay so do I erase the one in my kill script or the one in my saving script I am confused
Also, since you fixed the datastore script not working cause of the forgotten closed end), what is still your issue? Iām a little confused on your problem.
The one in your kill script so it will work maybe
It is still not working My main goal is making th edatastore work with the kill script
Just remove playeradded and characteradded
and make the character variable script.parent
Okay let me try to do that wait what do you mean to make it into script.Parent
the scripts parent is that and it is in startercharacterscripts
Okay let me try right now Thanks!
Okay if I use the script I showed you earlier it does nothing for some reason
did you remove the lines i told you to
The saving script saves but it does not use kill for money script
So I remove the first two?
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
local tag = character.Humanoid:FindFirstChild("creator")
if tag ~= nil then
if tag.Value ~= nil then
local stats = tag.Value:WaitForChild("leaderstats")
stats["Gold"].Value = stats ["Gold"].Value + 150
end
end
end)
end)
what are the errors in the code or are there none
No there are none errors I think