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

RankTag doesn't show up. But it prints. How to fix?

I have this script in StarterCharacterScripts, and the NameTag shows up, but the RankTag doesn't. But it prints great gamer too. Please help me to fix it.

local gameSettings = require(game.Workspace:WaitForChild("GameSettings"))
local MarketplaceService = game:GetService("MarketplaceService")

local character = script.Parent
local player = game.Players[character.Name]
local Humanoid = character:WaitForChild("Humanoid")
Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
Humanoid.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
local clonedNameTag = game.ReplicatedStorage:WaitForChild("Other"):WaitForChild("NameTag"):Clone()
clonedNameTag.Parent = character.Head
clonedNameTag.Text.Text = character.Name

if MarketplaceService:UserOwnsGamePassAsync(player.UserId,gameSettings.GamePassIDs.Premium) then
	print("great gamer")
	local clonedRankTag = game.ReplicatedStorage.Other.RankTag:Clone()
	clonedRankTag.Text.Text = "Premium"
	clonedNameTag.Parent = character.Head
end

1 comment

0

What is this Other thing?

1 answer

You don't parent the clonedRankTag object to the head, but instead re-parent the clonedNameTag. I do not know if this is an absolute certified fix, but it seems to be the main issue overlooked.

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