GetPlayer is the player who will receive the kill point.
Please make it into a script that will give you a kill point please
if part.Parent:FindFirstChild("Humanoid") then
local character = part.Parent -- creates a variable of the character
local player = game.Players:GetPlayerFromCharacte(character) -- gets the player
if player then
getPlayer().leaderstats.BOMB.Value += 1
end
end
First off, we are not here to write entire scripts for you. This is even mentioned in forum rules.
Second, did you generate this from ChatGPT? Because I cannot understand what getPlayer() function does even though the player variable is already set by calling the method :GetPlayerFromCharacter(character)
Anyway, try replacing getPlayer() with player and check the result.
I don’t know if you watched a tutorial or something but what does the getPlayer() function do? You’re already getting the Player above using GetPlayerFromCharacter().
I think the others aren’t getting it. This script is, as far as I understood, the children of the player killed, meaning “player” is that player instance. Of course you don’t want to give the person that got killed the kill point and other users wrote “player.leaderstats” which in this case would absolutely be wrong. I have solved your case before and I recommend you a tagging system as it’s the most reliable.
Here’s the regarding post with all the code: