BillboardGui를 이용하여 Player에 역할이나 팀을 표시하는 script 입니다.
script 아래 BillboardGui를 추가하고 아래 TaxtLabel를 추가한뒤
1. 팀이름과 Font 색을 정해주는 script를 짜고
2. BillboardGui 높이를 설정하고
3. TaxtLabel을 꾸며줍니다
======
local billboard = script.BillboardGui
local textPolice = "Police"
local blueColor = Color3.fromRGB(0,0,255)
local textTheif = "Theif"
local redColor = Color3.fromRGB(255,0,0)
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local playerCount = #game.Players:GetPlayers()
print ("player Count is : "..playerCount)
local newgui = billboard:Clone()
newgui.Parent = char.Head
if playerCount%2 == 1 then
newgui.TextLabel.TextColor3 = redColor
newgui.TextLabel.Text = textTheif
else
newgui.TextLabel.TextColor3 = blueColor
newgui.TextLabel.Text = textPolice
end
end)
end)
'Roblox Script' 카테고리의 다른 글
#12 : 총만들기 (인증 Weapons Kit 사용하기) (0) | 2020.08.06 |
---|---|
#11 : 그룹에 따라 팀 나누기 (Team by Group) (0) | 2020.08.06 |
#9 : RemoteEvent로 Sever에서 local function 호출 (0) | 2020.08.06 |
#8: Data Store - 서버에 값 저장하기 (0) | 2020.08.02 |
#7 : Remote Event로 클라이언트에서 서버 호출하기 (0) | 2020.08.02 |