Hello! Sorry to bother you today but I am making a script where when I or one of my friends join the game, then a billboard GUI pops up on top of their head. The problem with this script is that it works sometimes but then other times it doesn't work. Here is the script.
local player = game:GetService("Players")
local playersName = {"ShortTeamROBLOX", "BadBoyManJg"}
local OwnerBill = game:GetService("ServerStorage"):WaitForChild("OwnerBill")
player.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
for _, v in pairs(playersName) do
if plr.Name == v then
local OwnerBillClone = OwnerBill:Clone()
print("One of the devs of the game has joined the game!")
OwnerBillClone.StudsOffset = Vector3.new(0, 2, 0)
OwnerBillClone.Parent = char:FindFirstChild("Head")
OwnerBillClone.Adornee = char:FindFirstChild("Head")
OwnerBillClone.OwnerLabel.Text = "Developer"
local function changeColor()
while true do
OwnerBillClone.OwnerLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
wait(1)
OwnerBillClone.OwnerLabel.TextColor3 = Color3.fromRGB(255, 139, 44)
wait(1)
OwnerBillClone.OwnerLabel.TextColor3 = Color3.fromRGB(255, 248, 29)
wait(1)
OwnerBillClone.OwnerLabel.TextColor3 = Color3.fromRGB(6, 232, 6)
wait(1)
OwnerBillClone.OwnerLabel.TextColor3 = Color3.fromRGB(23, 112, 255)
wait(1)
OwnerBillClone.OwnerLabel.TextColor3 = Color3.fromRGB(161, 114, 255)
wait(1)
OwnerBillClone.OwnerLabel.TextColor3 = Color3.fromRGB(237, 94, 255)
wait(1)
end
end
changeColor()
end
end
end)
end)
If you have a solution, please feel free to comment below. Stay safe!

1 comment
Try :WaitForChild("Head")