So basically i made a title shop and a player buys and equips a title. I made a stringvalue to show what they are equipping but when they equip it how do i make it so the stringvalue shows, for ex: they buy a beginner title and that title gets added to their inventory, then they equip it, the name of the title gets added to the stringvalue’s value. How do i make it so that value shows
here is the script if it will be any help
--Variables
local MarketplaceService = game:GetService("MarketplaceService")
local rep = game:GetService("ReplicatedStorage")
local nametag = rep.NameTag
--functions
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
--Varibles
local head = char.Head
local newtext = nametag:Clone() --Cloning the text.
local uppertext = newtext.UpperText
local lowertext = newtext.LowerText
local humanoid = char.Humanoid
humanoid.DisplayDistanceType = "None"
--Text on head part
newtext.Parent = head
newtext.Adornee = head
uppertext.Text = player.Name --Changes the text to the player's name.
if player == player.EquippedTitle.Value then
if char.Head:FindFirstChild("BillboardGui") then
else
lowertext.Text = player.EquippedTitle.Value --This is that the text will say.
lowertext.TextColor3 = Color3.fromRGB(103, 24, 245) --This is what the color of the text will be.
end
end
end)
end)
--Variables
local rep = game:GetService("ReplicatedStorage")
local nametag = rep.NameTag
--functions
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
--Varibles
local head = char.Head
local newtext = nametag:Clone() --Cloning the text.
local uppertext = newtext.UpperText
local lowertext = newtext.LowerText
local humanoid = char.Humanoid
humanoid.DisplayDistanceType = "None"
--Main
newtext.Parent = head
newtext.Adornee = head
uppertext.Text = player.Name --Changes the text to the player's name.
if player == player.EquippedTitle.Value then
if char.Head:FindFirstChild("BillboardGui") then
else
lowertext.Text = player.EquippedTitle.Value --This is that the text will say.
lowertext.TextColor3 = Color3.fromRGB(103, 24, 245) --This is what the color of the text will be.
end
end
end)
end)