What is wrong with my gui script

Ah sorry, try this

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)

Tried that, saw nothing in OutPut

this is a local script right ?

1 Like

Yep, this is a local script.

(character limit)

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

got this error:

Adornee is not a valid member of ScreenGui "Workspace.GammerAtomYT.Head.overheadGui" 

can you send screen short of children of overheadGui

1 Like

that’s the only thing in there ?

1 Like

yes, that is.
(character limit)

bruh did you make the overheadGui/write the script ?

no, I combined other peoples scripts at 5am

that script is not made for the overheadGui you have, try reworking on that

can you help with that please?

InsRankHandler.rbxm (6.5 KB)
insert this in you game.

2 Likes

i cant insert it, HELPPLLPLPLP

nvm i just needed to change the file extention to rbxl.

1 Like

go here, get model, open studio, open your game, open toolbox, click on the 2nd option
image
, then click on this
image

2 Likes

tried that script, still didn’t work

here’s the script:

local groupID = 17172847


game.Players.PlayerAdded:Connect(function(player)
	local groupRank = player:GetRoleInGroup(groupID)
	local clone = script.Rank:Clone()
	clone.Parent = game.Workspace:WaitForChild(player.Name).Head
	clone.Frame.Name1.Text = player.Name
	clone.Frame.Rank.Text = groupRank
	
	player.CharacterAdded:Connect(function()
		local groupRank = player:GetRoleInGroup(groupID)
		local clone = script.Rank:Clone()
		clone.Parent = game.Workspace:WaitForChild(player.Name).Head
		clone.Frame.Name1.Text = player.Name
		clone.Frame.Rank.Text = groupRank
		print("f")
	end)


end)
``
1 Like

bruh that works, I have tested it
Edit: what have you parented the script to ?

2 Likes

the script is parented with the overheadGui

1 Like