Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Taghumanoid(I dont understand it)?

Asked by 8 years ago

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

Log in to vote
0
Answered by
Im_Kritz 334 Moderation Voter
8 years ago

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.

0
Thanks! GodOfRBLX 21 — 8y
Ad

Answer this question