#Overhead Gui

33 messages · Page 1 of 1 (latest)

covert shard
#

because the first check iis true if the player is an officer, so it will skip the other check statements

#

to fix, you can check is the player is SWAT first before checking if the player is a officer

wooden pilot
#

@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

covert shard
#

you didnt change anything?

wooden pilot
#

i did

covert shard
#

or i am blind

wooden pilot
#

you told me to first check if IsSWAT == true

#

so I changed it

#

idk if I understand you well

covert shard
#

ok nvmd thought of an easier way

#

using the original code, change all the "elseif" to "if"

wooden pilot
#

ok

covert shard
#

and also add "end"s where needed

wooden pilot
#

@covert shard still doesn't wrk

#

:/

#

ill try whatever u say tomorrow

#

cuz i gtg

#

cya

covert shard
#

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) ```
wide epochBOT
#

studio** You are now Level 1! **studio

covert shard
#

try that, (without the lua bit at the start)

#

hang on players don't have a property called "IsSWAT", where is that coming from

wooden pilot
#

It's a boolean value

covert shard
#

does it actually return a boolean?

wooden pilot
#

Wdym

covert shard
#

make a new script, with one line:

#

print(player.IsSwat)

wooden pilot
#

I'll do it tomorrow cuz I gtg sleep

covert shard
#

fair

wooden pilot
#

Well it is there cuz I had to somehow test it