I'm trying to make it so that only I have the "Owner" tag and everyone else has a "Player" tag. But most of the times i get a mix of owner and player, or the owner only pops up for me and everyone else doesn't have a player tag. How do i fix this?
this is the script
local billboardgui = game:GetService("ServerStorage"):WaitForChild("BillboardGui")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if player.Name == "KingOfEpicness_1337" then
local clonedgui = billboardgui:Clone()
game:GetService("ServerStorage"):WaitForChild("Player"):WaitForChild("TextLabel").TextSize = 0
clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
if not player.Name == "KingOfEpicness_1337" then
local billboardgui = game:GetService("ServerStorage"):WaitForChild("Player")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
game.GetService("ServerStorage"):WaitForChild("Player"):WaitForChild("TextLabel").TextSize = 40
local cloned = billboardgui:Clone()
cloned.TextLabel.Text = "Player"
cloned.TextLabel.TextColor3 = Color3.fromRGB(36,154,165)
cloned.Parent = game.Workspace:WaitForChild(player.Name).Head
end)
end)
end
end end)
end)

1 comment
Your if statements should really be seperate and not nested. Further, they should just be if, then, else.