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

Taghumanoid(I dont understand it)?

Recently I have been attempting to learn how to make gun's from scratch and, when I try to see things about it (Free models and stuff), for the damage it says taghumanoid, what does it mean? Thanks for reading!

1 answer

Tagging a humanoid means each time a weapon damages another player, it creates an ObjectLabel with the value being the weapon owner. The tag removes itself after a short amount of time.

Example:

local function TagHumanoid(Player, Killer)
if game:GetService('Players'):FindFirstChild(Player.Name) then
local Tag = Instance.new('Object', Player)
Tag.Name = 'creator'
Tag.Value = Killer
game:GetService('Debris'):AddItem(Tag, .5)
end
end

If the player dies with the Tag on them, then the leaderboard picks that up and gives the kill to the Tag's value.

1 comment

0

Thanks!

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