I did Overhead gui And I have a blue square showing, I want to remove this square, but I don’t know how to make this script
local overheadGUIs = game.ServerStorage:WaitForChild("OverheadGUIs")
local ClassesGUI = overheadGUIs:WaitForChild("ClassesOverHead")
local character = script.Parent
local head = character:WaitForChild("Head") -- Ensure Head is loaded
local player = game.Players:GetPlayerFromCharacter(character)
local currentClass = player.leaderstats:WaitForChild("Class")
-- Mapping class names to image IDs
local classImageIds = {
FClass = "http://www.roblox.com/asset/?id=13537877719",
EClass = "http://www.roblox.com/asset/?id=13537890076",
DClass = "http://www.roblox.com/asset/?id=14789258408",
CClass = "http://www.roblox.com/asset/?id=14789260188",
BClass = "http://www.roblox.com/asset/?id=14789262376",
AClass = "http://www.roblox.com/asset/?id=14789263743",
SClass = "http://www.roblox.com/asset/?id=14789265141",
SSClass = "http://www.roblox.com/asset/?id=14789267036",
SSSClass = "http://www.roblox.com/asset/?id=14789268533",
XClass = "http://www.roblox.com/asset/?id=14789270511",
YClass = "http://www.roblox.com/asset/?id=14789272766",
ZClass = "http://www.roblox.com/asset/?id=14789274018",
XYZClass = "http://www.roblox.com/asset/?id=14789275327"
}
-- Clone the GUI for the player's head
local newClassesGUI = ClassesGUI:Clone()
newClassesGUI.Name = "OverheadClassesGUI"
newClassesGUI.Parent = head
-- Function to update the class image based on the current class
local function updateClassImage()
local className = currentClass.Value:gsub("-", "") -- Normalize class name
local imageId = classImageIds[className] -- Get the corresponding image ID
if imageId then
newClassesGUI.ImageLabel.Image = imageId -- Update image if class is found
else
warn("Class image ID not found for class: " .. className) -- Debug message
end
end
-- Connect the Changed event to update the image when the class changes
currentClass.Changed:Connect(updateClassImage)
-- Initial image update in case the class is already set
updateClassImage()