Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why isn't my Tagging not working? [UNANSWERED D:<]

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.

2 answers

script.Parent.Name is a string at line 2

1 comment

0

That isn't the problem. It works perfectly as a string.

--Fix line 2 of code
 if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= script.Parent.Name then

1 comment

0

That isn't the problem. It works perfectly as a string. The problem is the 'CreateTags(Attacker, VictimHumanoid)'

This discussion is preserved as it was. New answers, comments, and votes are closed.