local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ChatService = game:GetService("Chat")
local overheadGui = game:GetService("StarterGui"):WaitForChild("overheadGui")
local groupId = 17172847
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local head = character.Head
local overheadGuiClone = overheadGui:Clone()
local Success,Result = pcall(function()
return player:GetRankInGroup(groupId)
end)
local humanoid = character.Humanoid
humanoid.DisplayDistanceType = "None"
overheadGuiClone.Parent = head
overheadGuiClone.Adornee = head
overheadGuiClone.PlayerName.Text = tostring(player.Name)
print(Result)
if Success then -- here
if Result >= 254 then
overheadGuiClone.PlayerRank.Text = "Goofiest Of All Goobers"
spawn(function()
while task.wait() do
local t = 5;
local hue = tick() % t / t
local colorrr = Color3.fromHSV(hue, 1, 1)
overheadGuiClone.PlayerRank.TextColor3 = colorrr
end -- to here is making a rainbow color
end)
elseif Result == 253 then
overheadGuiClone.PlayerRank.Text = "Ultra Goober"
overheadGuiClone.PlayerRank.TextColor3 = Color3.fromRGB(163, 0, 0)
elseif Result == 2 then
overheadGuiClone.PlayerRank.Text = "Mega Goober"
overheadGuiClone.PlayerRank.TextColor3 = Color3.fromRGB(30, 226, 0)
elseif Result == 1 then
overheadGuiClone.PlayerRank.Text = "Goober"
overheadGuiClone.PlayerRank.TextColor3 = Color3.fromRGB(0, 174, 255)
elseif Result == 0 then
overheadGuiClone.PlayerRank.Text = ""
end
end
end)
end)
that’s the issue over here, try this script
try this
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ChatService = game:GetService("Chat")
local overheadGui = game:GetService("StarterGui"):WaitForChild("overheadGui")
local groupId = 17172847
repeat
task.wait()
until game.Players.LocalPlayer.Character
local player = game.Players.LocalPlayer
local character = player.Character
local head = character.Head
local overheadGuiClone = overheadGui:Clone()
local Success,Result = pcall(function()
return player:GetRankInGroup(groupId)
end)
local humanoid = character.Humanoid
humanoid.DisplayDistanceType = "None"
overheadGuiClone.Parent = head
overheadGuiClone.Adornee = head
overheadGuiClone.PlayerName.Text = tostring(player.Name)
print(Result)
if Success then -- here
if Result >= 254 then
overheadGuiClone.PlayerRank.Text = "Goofiest Of All Goobers"
spawn(function()
while task.wait() do
local t = 5;
local hue = tick() % t / t
local colorrr = Color3.fromHSV(hue, 1, 1)
overheadGuiClone.PlayerRank.TextColor3 = colorrr
end -- to here is making a rainbow color
end)
elseif Result == 253 then
overheadGuiClone.PlayerRank.Text = "Ultra Goober"
overheadGuiClone.PlayerRank.TextColor3 = Color3.fromRGB(163, 0, 0)
elseif Result == 2 then
overheadGuiClone.PlayerRank.Text = "Mega Goober"
overheadGuiClone.PlayerRank.TextColor3 = Color3.fromRGB(30, 226, 0)
elseif Result == 1 then
overheadGuiClone.PlayerRank.Text = "Goober"
overheadGuiClone.PlayerRank.TextColor3 = Color3.fromRGB(0, 174, 255)
elseif Result == 0 then
overheadGuiClone.PlayerRank.Text = ""
end
end