hello, so this code has not been working on me, it doesn’t show up when i join the game, however, it shows up on others. it shows me no errors on the console when i join.
here is the script
local groupID = 6207547
local gamepass = 0 --44423213
game.Players.PlayerAdded:Connect(function(player)
print(player.Name.." is in the game")
player.CharacterAdded:Connect(function(character)
print(player.Name.. "has been added as a character") -- make sure it was added to char
local groupRank = player:GetRoleInGroup(groupID) -- checks if player is in groip
local clone = script.Rank:Clone() -- clones the textlabel
clone.Parent = character.Head -- puts the text label on players head
clone.Name1.Text = player.Name
clone.RankF.Text = groupRank
local text = script.Rank.Name1 -- what the label will be
local add = 1
local k = 1
local market = game:GetService("MarketplaceService") -- checks market for gamepass
local AFKStatus = {} -- afk script i have in antoher place
local AFKEvent = game.ReplicatedStorage:FindFirstChild("ShowGUI")
if not AFKEvent then
AFKEvent = Instance.new("RemoteEvent")
AFKEvent.Parent = game.ReplicatedStorage
AFKEvent.Name = "AFK | "..groupRank.." "
end
local updateAFK = function(player,enable)
local Main = player.Character:WaitForChild("Head"):WaitForChild("Rank") -- waits for rank to place
local AFKTagT = Main:WaitForChild("RankF")
if enable then
AFKTagT.Visible = true
AFKTagT.Text = "AFK | "..groupRank.." "
else
AFKTagT.Text = groupRank
end
end
AFKEvent.OnServerEvent:Connect(function(player,enable)
AFKStatus[player] = enable
updateAFK(player,enable)
end)
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(Msg)
-- if player.OwnsGamePassAync.market(gamepass) then
if Msg == "@host" or "@Host" then
print("Changing the Text Color b for: "..player.Name)
clone.Name1.TextColor3 = Color3.new(1, 1, 1)
clone.RankF.TextColor3 = Color3.new(1, 1, 1)
else
if Msg == "@pink" or "@Pink" then
print("Changing the Text Color p for: "..player.Name)
clone.Name1.TextColor3 = Color3.new(1, 0.4, 0.952941)
clone.RankF.TextColor3 = Color3.new(1, 0.4, 0.952941)
else
if Msg == "@purple" or "@Purple" then
print("Changing the Text Color p for: "..player.Name)
clone.Name1.TextColor3 = Color3.new(0.654902, 0.168627, 1)
clone.RankF.TextColor3 = Color3.new(0.654902, 0.168627, 1)
else
if Msg == "@rainbow" or "@Rainbow" then
print("Changing the Text Color rainbow for: "..player.Name)
end
end
end
end
end)
end) --Ending the chatted
end) --Ending the characteradded
end) --