#Overhead Gui
33 messages · Page 1 of 1 (latest)
to fix, you can check is the player is SWAT first before checking if the player is a officer
@covert shard still doesn't work
local plrs = game:GetService("Players")
plrs.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local clone = script.BillboardGui:Clone()
clone.Parent = char.Head
clone.Name1.Text = plr.Name
clone.Rank.Text = plr.Team.Name
if plr.Team == game.Teams.Officer then
clone.Rank.TextColor3 = Color3.fromRGB(0, 4, 255)
elseif plr.Team == game.Teams.Civilian then
clone.Rank.TextColor3 = Color3.fromRGB(124, 124, 124)
elseif plr.IsSWAT == true and plr.Team == game.Teams.Officer then
clone.Rank.Text = "Special Weapons And Tactics"
clone.Rank.TextColor3 = Color3.fromRGB(0, 0, 0)
end
clone.Rank.Changed:Connect(function()
if plr.Team == game.Teams.Officer then
clone.Rank.TextColor3 = Color3.fromRGB(0, 4, 255)
elseif plr.Team == game.Teams.Civilian then
clone.Rank.TextColor3 = Color3.fromRGB(124, 124, 124)
elseif plr.IsSWAT == true and plr.Team == game.Teams.Officer then
clone.Rank.Text = "Special Weapons And Tactics"
clone.Rank.TextColor3 = Color3.fromRGB(0, 0, 0)
end
end)
end)
end)```
idk if I did it good
or wrong
you didnt change anything?
i did
or i am blind
you told me to first check if IsSWAT == true
so I changed it
idk if I understand you well
ok nvmd thought of an easier way
using the original code, change all the "elseif" to "if"
ok
and also add "end"s where needed
@covert shard still doesn't wrk
:/
ill try whatever u say tomorrow
cuz i gtg
cya
plrs.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local clone = script.BillboardGui:Clone()
clone.Parent = char.Head
clone.Name1.Text = plr.Name
clone.Rank.Text = plr.Team.Name
if plr.Team == game.Teams.Officer then
clone.Rank.TextColor3 = Color3.fromRGB(0, 4, 255)
end
if plr.Team == game.Teams.Civilian then
clone.Rank.TextColor3 = Color3.fromRGB(124, 124, 124)
end
if plr.IsSWAT == true and plr.Team == game.Teams.Officer then
clone.Rank.Text = "Special Weapons And Tactics"
clone.Rank.TextColor3 = Color3.fromRGB(0, 0, 0)
end
clone.Rank.Changed:Connect(function()
if plr.Team == game.Teams.Officer then
clone.Rank.TextColor3 = Color3.fromRGB(0, 4, 255)
end
if plr.Team == game.Teams.Civilian then
clone.Rank.TextColor3 = Color3.fromRGB(124, 124, 124)
end
if plr.IsSWAT == true and plr.Team == game.Teams.Officer then
clone.Rank.Text = "Special Weapons And Tactics"
clone.Rank.TextColor3 = Color3.fromRGB(0, 0, 0)
end
end)
end)
end) ```
** You are now Level 1! **
try that, (without the lua bit at the start)
hang on players don't have a property called "IsSWAT", where is that coming from
It's a boolean value
does it actually return a boolean?
Wdym
I'll do it tomorrow cuz I gtg sleep
fair
Well it is there cuz I had to somehow test it