I’m trying to make a nametag shop where if you press a button, that will change a color3 value in replicated storage, then i’m trying to make the nametag that color, but for some reason it wont work, it isn’t even throwing an error, could someone please help?
Code:
local playerTag = game.ReplicatedStorage:WaitForChild("PlayerTag"):FindFirstChild("PlayerNametag")
local playerTagValue = game.ReplicatedStorage:WaitForChild("PlayerTag"):FindFirstChild("PlayerTagValue")
local tagColor = game.ReplicatedStorage.PlayerTag:WaitForChild("tagColor")
game.ReplicatedStorage.PlayerTag.ChangeTag.OnServerEvent:Connect(function(plr)
if game.ReplicatedStorage.PlayerTag.HasTag.Value == false then
local clone = playerTag:Clone()
clone.Text.Visible = true
clone.Parent = plr.Character.Head
clone.Text.Text = playerTagValue.Value
clone.Text.Visible = true
clone.Text.TextColor3 = Color3.new(tagColor.Value)
game.ReplicatedStorage.PlayerTag.HasTag.Value = true
elseif game.ReplicatedStorage.PlayerTag.HasTag.Value == true then
plr.Character.Head.PlayerNametag.Text.Text = playerTagValue.Value
plr.Character.Head.PlayerNametag.Text.TextColor3 = Color3.new(tagColor.Value)
end
end)```