I made a script that basically releases a ball full of light. And every time a Player successfully kills another player, they receive 15 PTS. But I made it by using a ROBLOX method, and it's not working. Take a look.
function Kill(Part) if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= "script.Parent.Name" then script.Disabled = true f = Instance.new("Fire") for i =1,25 do Part.Parent.Humanoid.Health = Part.Parent.Humanoid.Health -3 wait(0.05) end script.Parent:Remove() end wait(0.025) end script.Parent.Touched:connect(Kill) function CreateTags(Attacker, victimHumanoid) for i, v in pairs(victimHumanoid:GetChildren()) do if v.Name == "creator" then v.Remove() end end Tag = Instance.new("ObjectValue") Tag.Parent = victimHumanoid Tag.Name = "creator" Tag.Value = Attacker local searchup = Attacker:FindFirstChild("Data") if searchup then local searchup2 = Attacker.Data:FindFirstChild("Haoshoku") if searchup2 then Attacker.Data.Haoshoku.Value = Attacker.Data.Haoshoku.Value + 15 end end end CreateTags()
Everything until the 2nd Function works.
script.Parent.Name is a string at line 2
--Fix line 2 of code if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= script.Parent.Name then