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

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

Asked by 3 years ago

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
0
What is this Other thing? SitaruDaniel 44 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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.

Ad

Answer this question