I edited an overhead cloning script and it works for a long time now but it suddenly stop working, what I try first was to Remove the script base on an error but it doesn' t work, so next I try to Donwdate the game using the version which work perfectly but it doesnt solve the problem.
The error message have something to do on the "Role" which I tried to delete but it doesn't work, I think it is cause by some update made by roblox.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Overheads = ReplicatedStorage:WaitForChild("OverheadsGui")
local GroupId = 11540689 ----// GROUP ID
local Left = Overheads:WaitForChild("Left")
local Right = Overheads:WaitForChild("Right")
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
-- These variables are used regardless of whether the user owns the gamepass or not
-- so we can define them outside the if statement
local Humanoid = Character:WaitForChild("Humanoid")
local Head = Character:WaitForChild("Head")
local Stats = Player:WaitForChild("playerstats").Rank.Value
-- Again, this happens regardless of the if statement
Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
if Stats == "Unrank" then
Left.Image = "rbxassetid://11260847774"
Right.Image = "rbxassetid://11260873360"
elseif Stats == "Bronze" then
Left.Image = "rbxassetid://11260880194"
Right.Image = "rbxassetid://11260884454"
elseif Stats == "Silver" then
Left.Image = "rbxassetid://11260890595"
Right.Image = "rbxassetid://11260895668"
elseif Stats == "Gold" then
Left.Image = "rbxassetid://11260902279"
Right.Image = "rbxassetid://11260906114"
elseif Stats == "GoldPlus" then
Left.Image = "rbxassetid://11260911548"
Right.Image = "rbxassetid://11260917532"
elseif Stats == "Creator" then
Left.Image = "rbxassetid://11260911548"
Right.Image = "rbxassetid://11260917532"
elseif Stats == "Tester" then
Left.Image = "rbxassetid://11260911548"
Right.Image = "rbxassetid://11260917532"
elseif Stats == "Contributor" then
Left.Image = "rbxassetid://11260911548"
Right.Image = "rbxassetid://11260917532"
end
local CloneGui = Overheads:Clone()
CloneGui.Username.Text = Player.Name
CloneGui.Parent = Head
CloneGui.Name = "OverheadGui"
local Role = "Guest"
pcall(function()
Role = Player:GetRoleInGroup(GroupId)
end)
CloneGui.Role.Text = Role
end)
end)

4 comments
Still not work, I received this error message "Role is not a valid member of BillboardGui "OverheadGui" However the Role exist on the OverheadGui.
Are you doing OverheadGui[Role].Value ?
I'm not sure about what do you mean but, Do have a textframe which named as Role and it is a member of OverheadGui
Thank you for your help, I make a new script using starterplayer instead for player and character added and it works