In there game there's a leaderstats and in intvalue called Level. This script is supposed to bring up the level by one on every ko the player gets. This script is located inside the tool (sword). It's supposed to award the player that kills the person with + 1 to the level.
--Define your player
local plr = game.Players.LocalPlayer
script.Parent.Handle.Touched:connect(function(hit)
--Checks to make sure it's a player
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
--Create the tag, place it in their Humanoid
local tag = Instance.new('ObjectValue',hit.Parent.Humanoid)
tag.Name = 'creator'
-- value = player instance
tag.Value = plr
wait(.5)
local holder = script.Parent.Parent:GetPlayerFromCharacter()
local level = holder.leaderstats.Level
if tag.Parent.Health == 0 then
level.Value = level.Value + 1
--Tag Expire
wait(.5)
tag:Destroy()
end
end
end)
If it's possible that you explain/fix this that would be great thanks.

2 comments
Could you explain what doesn't work, and provide any errors?
The " :GetPlayerFromCharacter()" part doesn't seem to work which stops the leveling up. The tag part of the script works. Also when it is working it is possible that players farm for than one level up because they can smack the dead humanoid.