hello, im trying to make creator tag work
-
What do you want to achieve? Keep it simple and clear!
I want to make creator tag work -
What is the issue? Include screenshots / videos if possible!
Here is the screenshot of a gun on Explorer -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i searched about creator tag but i didnt fixed it
i tried to put functions on main script and damage script but it didnt work, did i made something wrong on these scripts
heres the damage script
local hitevent = script.Parent.Fire
local damage = require(script.Parent.ModuleScript)["damage"]
function TagHumanoid(humanoid, player)
local Creator_Tag = Instance.new("ObjectValue")
Creator_Tag.Name = "creator"
Creator_Tag.Value = player
game.Debris:AddItem(Creator_Tag, 2)
Creator_Tag.Parent = humanoid
end
local function dmgHuman(player,target)
local targetplayer = nil
for _, beano in pairs(game:GetService("Players"):GetChildren()) do
if beano.Name == target.Parent.Name then
targetplayer = beano
break
end
end
if targetplayer then
if targetplayer.Team ~= player.Team then
TagHumanoid(targetplayer,player)
local tag = Instance.new("ObjectValue")
tag.Value = player
tag.Parent = target
target.Health = target.Health - damage
end
else
local tag = Instance.new("ObjectValue")
tag.Value = player
tag.Parent = target
target.Health = target.Health - damage
end
end
hitevent.OnServerEvent:Connect(dmgHuman)
hitevent.OnServerEvent:Connect(dmgHuman)
hitevent.OnServerEvent:Connect(dmgHuman)
how do i fix this problem?