I am having a problem, what happens is that the "textlabel" is visible overhead of my player but for only 1 second when I press to change to team red and then it disappears, how can I solve this problem?
Code:
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
game.Teams.Redteam.PlayerAdded:Connect(function(player)
script.BillboardGui.Frame.Visible = true
print(player.Name .. " joined the game!")
local groupId = "Captain"
local guiClone = script.BillboardGui:Clone()
guiClone.Parent = character.Head
local textlabel = guiClone.Frame.TextLabel
local groupRank = player:GetRoleInGroup(groupId)
textlabel.Text = groupRank
end)
end)
end)
I need to make the player have that "textlabel" with the role name overhead all the time he is in the red team
question from:
https://stackoverflow.com/questions/65649482/code-problems-role-name-overhead-roblox-studio-lua 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…