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

Trying to parent a BillboardGui to the Head of a player?

Asked by 5 years ago

So I made tags that go above the players head and I have them in StarterGui. I'm wondering how to make the Owner and CoOwner tag parented to the head of the selected player.

Here is my code:

01local OwnerTag = game.StarterGui.OwnerTag
02local CoOwnerTag = game.StarterGui.CoOwnerTag
03local SuperFanTag = game.StarterGui.SuperFanTag
04 
05game.Players.ChildAdded:Connect(function(plr)
06    local Tags = Instance.new("Folder", plr)
07    Tags.Name = 'ChatTags'
08 
09    if plr.Name == "sharksaresuper" and plr.ID = 76647544 then
10        OwnerTag.Parent = ()
11    end
12 
13    if plr.Name == "matiss112233" and plr.ID = 91709180 then
14        CoOwnerTag.Parent = ()
15    end
16 
17    if plr:IsInGroup(5424371) then
18        SuperFanTag.Parent = ()
19    end
20end)

1 answer

Log in to vote
1
Answered by
IcyMizu 122
5 years ago
Edited 5 years ago
01game.Players.PlayerAdded:Connect(function(plr)-- when the player joins and getting the plr that joined
02    plr.CharacterAdded:Connect(function(char) -- when the character spawned and getting the character that spawned
03        local Owner = "OwnersName" -- owners name here
04        local CoOwner = "CoOwnersName"
05 
06        if plr.Name == Owner then
07            local OwnerTag = game.StarterGui.OwnerTag:Clone() -- cloning the tag
08            OwnerTag.Parent = char.Head -- setting its parent to head
09        end
10 
11        if plr.Name == CoOwner then
12            local CoOwnerTag = game.StarterGui.CoOwnerTag:Clone() -- cloning the tag
13            CoOwnerTag.Parent = char.Head -- setting its parent to head
14        end
15 
View all 22 lines...

I hope this works comment if not

0
Thanks! matiss112233 258 — 5y
Ad

Answer this question