I am trying to change my billboardgui IF it is in the players head. If not in the players head clone it to the players head then change it.
game.ReplicatedStorage.RemoteEvents:WaitForChild("NoobTRE").OnServerEvent:Connect(function(Player)
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
script.Parent.MouseButton1Click:Connect(function()
local billboardgui = game.ServerStorage:WaitForChild("VIP")
local clonedgui = billboardgui:Clone()
local VIP = game.Workspace:WaitForChild(Player.Name).Head:FindFirstChild("VIP")
if VIP then
VIP.TextLabel.Text = "Noob"
VIP.TextLabel.TextColor3 = Color3.fromRGB(80, 80, 80)
else
clonedgui.TextLabel.Text = "Noob"
clonedgui.TextLabel.TextColor3 = Color3.fromRGB(80, 80, 80)
clonedgui.Parent = game.Workspace:WaitForChild(Player.Name).Head
end
end)
end)
end)
end)

1 comment
What do you mean by "it isnt changing"? when you make the clone or have the VIP as valid, the color and text are the same