So, I’m duplicating this script where if a player is a certain rank in a group then it will give them a tag. The script is:
if Player:IsInGroup(10402709) then
if Player:GetRankInGroup(10402709) == 8
local CreatorTag = STAFF_Tag:Clone()
CreatorTag.Parent = Character.Head
end
Where it says ‘CreatorTag.Parent’, I searched up CreatorTag in the workspace and there is nothing there, does that mean I can name it to anything and the script wont break? Or is it something else?
CreatorTag is the name of the variable which contains a clone of STAFF_Tag, basically yes you can rename the CreatorTag variable and it wont break anything unless you forget to change a reference to it
Did you forget to change any references to the CreatorTag variable? Did you just only change the CreatorTag.Parent line? If so, you gotta also change the local CreatorTag line to have the new name of the variable
Yup, did that too. I made a STAFF_Tag billboard GUI aswell, basically duplicated a billboard gui from the creator_tag that actually works, and this is the full script, I just added my own one to it. Is there anything in this script preventing it from working?
local MarketPlaceService = game:GetService(“MarketplaceService”)
local gamePassId = 00000 --REPLACE THIS WITH YOUR GAMEPASSID
local groupId = 10402709 --REPLACE THIS WITH YOUR GROUPID
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local GuiClone = script.GroupRankOverHead:Clone()
GuiClone.Parent = Character.Head
local PlayerName = GuiClone.PlayerName
local RankName = GuiClone.RankName
local PlayerRank = Player:GetRoleInGroup(groupId)
PlayerName.Text = Player.Name
RankName.Text = PlayerRank
if Player.Name == "2DLAF" then
local CreatorTag = script.CREATOR_Tag:Clone()
CreatorTag.Parent = Character.Head
end
if Player:GetRankInGroup(10402709) == 8 then
local StaffTag = STAFF_Tag:Clone()
StaffTag.Parent = Character.Head
end
if MarketPlaceService:UserOwnsGamePassAsync(Player.UserId,gamePassId) then
local ExtraTag = script.PREMIUM_Tag:Clone()
ExtraTag.Parent = Character.Head
end
I think I see your issue? There was nothing in your script called STAFF_Tag, I think you forgot a reference to the script, try this?
local MarketPlaceService = game:GetService(“MarketplaceService”)
local gamePassId = 00000 --REPLACE THIS WITH YOUR GAMEPASSID
local groupId = 10402709 --REPLACE THIS WITH YOUR GROUPID
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local GuiClone = script.GroupRankOverHead:Clone()
GuiClone.Parent = Character.Head
local PlayerName = GuiClone.PlayerName
local RankName = GuiClone.RankName
local PlayerRank = Player:GetRoleInGroup(groupId)
PlayerName.Text = Player.Name
RankName.Text = PlayerRank
if Player.Name == "2DLAF" then
local OwnerTag = script.CREATOR_Tag:Clone()
OwnerTag.Parent = Character.Head
elseif Player:GetRankInGroup(10402709) == 8 then
local StaffTag = script.STAFF_Tag:Clone()
StaffTag.Parent = Character.Head
elseif MarketPlaceService:UserOwnsGamePassAsync(Player.UserId,gamePassId) then
local ExtraTag = script.PREMIUM_Tag:Clone()
ExtraTag.Parent = Character.Head
end
end)
end)
local MarketPlaceService = game:GetService("MarketplaceService")
local gamePassId = 00000 --REPLACE THIS WITH YOUR GAMEPASSID
local groupId = 10402709 --REPLACE THIS WITH YOUR GROUPID
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
print("Both events are firing")
local GuiClone = script.GroupRankOverHead:Clone()
GuiClone.Parent = Character.Head
local PlayerName = GuiClone.PlayerName
local RankName = GuiClone.RankName
local PlayerRank = Player:GetRoleInGroup(groupId)
PlayerName.Text = Player.Name
RankName.Text = PlayerRank
print("Changed settings for the player")
if Player.Name == "2DLAF" then
print("Found the owner")
local OwnerTag = script.CREATOR_Tag:Clone()
OwnerTag.Parent = Character.Head
elseif Player:GetRankInGroup(10402709) == 8 then
print("Found a staff member")
local StaffTag = script.STAFF_Tag:Clone()
StaffTag.Parent = Character.Head
elseif MarketPlaceService:UserOwnsGamePassAsync(Player.UserId,gamePassId) then
print("Found a Premium Member")
local ExtraTag = script.PREMIUM_Tag:Clone()
ExtraTag.Parent = Character.Head
end
end)
end)
You should have 4Tag Objects parented inside your script I believe, the GuiObject itself, the CREATOR, STAFF, and PREMIUM Tags
Do check your Output and see what returns back, this should be a server script