Im trying to achieve just a simple Creator tag that goes over my head in my simulator game, the issue is when I reset the nametag just disappears into oblivion, ive tried asking other scripters and they said I would need another line of script to keep the nametag there for when I reset but I honestly cannot figure it out, I just need some assistance with creating this because im at my breaking point
local players = game:GetService("Players")
local rainbow = false
players.PlayerAdded:Connect(function(player)
if player.Name == "JackEatsFrootLoops" then
wait(5)
local gui = script:WaitForChild("BillboardGui")
local text = gui:WaitForChild("TextLabel")
if rainbow == true then
text:WaitForChild("ColorChange").Disabled = false
end
text.Font = Enum.Font.Oswald
text.Text = "CREATOR"
text.TextColor3 = Color3.fromRGB(0, 0, 128)
gui.Parent = player.Character.Head
end
end)
When the player respawns you’d want them to respawn with the Billboard GUI. Currently, there is no instruction on what to do with a Billboard GUI when a player respawns. To fix this, we’ll add some code to specifically instruct that when a player’s character is added into the game at any point, give them the Billboard Gui.
local players = game:GetService("Players")
local rainbow = false
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if player.Name == "JackEatsFrootLoops" then
task.wait(5)
local gui = script:WaitForChild("BillboardGui")
local text = gui:WaitForChild("TextLabel")
if rainbow == true then
text:WaitForChild("ColorChange").Disabled = false
end
text.Font = Enum.Font.Oswald
text.Text = "CREATOR"
text.TextColor3 = Color3.fromRGB(0, 0, 128)
gui.Parent = character.Head
end
end)
end)
Storing the billboard in serverstorage under a folder named Tags and waiting for players appreance to load before cloning billboard to player should work well.
local players = game:GetService("Players")
local rainbow = false
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if player.Name == "JackEatsFrootLoops" then
player.CharacterAppearanceLoaded:Wait()
local gui = game:GetService("ServerStorage"):WaitForChild("Tags"):WaitForChild("BillboardGui")
local ServerTagClone = gui:Clone()
local text = ServerTagClone:WaitForChild("TextLabel")
if rainbow == true then
text:WaitForChild("ColorChange").Disabled = false
end
text.Font = Enum.Font.Oswald
text.Text = "CREATOR"
text.TextColor3 = Color3.fromRGB(0, 0, 128)
ServerTagClone.Parent = character:WaitForChild("Head")
end
end)
end)
You need to clone the gui and then parent it to your character. In short, you’re basically putting it on your character once and then it’s non existent, which is why it doesn’t reappear.
local players = game:GetService("Players")
local gui = script:WaitForChild("BillboardGui")
local rainbow = false
players.PlayerAdded:Connect(function(player)
if player.Name == "JackEatsFrootLoops" then
player.CharacterAdded:Connect(function(character)
wait(5)
local guiClone = gui:Clone()
local text = guiClone:FindFirstChild("TextLabel")
if rainbow == true then
text:FindFirstChild("ColorChange").Disabled = false
end
text.Font = Enum.Font.Oswald
text.Text = "CREATOR"
text.TextColor3 = Color3.fromRGB(0, 0, 128)
guiClone.Parent = character:WaitForChild("Head")
end)
end
end)