Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Overhead GUI doesn't work how can i fix these?

did i script this correctly because it only gave me the bbgfan

local bbgFan = game.ServerStorage.OverheadGroup
local bbgVip = game.ServerStorage.OverheadVip
local bbgAll = game.ServerStorage.OverHeadAll

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(char)
        
local HasPass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,12330967)

    if player:IsInGroup(7870490) then
        local cloneg = bbgFan:Clone()
            cloneg.Parent = game.Workspace:WaitForChild(player.Name).Head
    elseif HasPass then
        local cloneg2 = bbgVip:Clone()
            cloneg2.Parent = game.Workspace:WaitForChild(player.Name).Head
    elseif player:IsInGroup(7870490) and HasPass then
        local cloneg3 = bbgAll:Clone()
           cloneg3.Parent = game.Workspace:WaitForChild(player.Head).Head
        end
    end)
end)

1 comment

0

You should put the highest/most at the top, and the lowest/least at the bottom.

1 answer

local bbgFan = game.ServerStorage.OverheadGroup
local bbgVip = game.ServerStorage.OverheadVip
local bbgAll = game.ServerStorage.OverHeadAll

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(char)

local HasPass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,12330967)

    if player:IsInGroup(7870490) and HasPass then
        local cloneg = bbgAll:Clone()
            cloneg.Parent = game.Workspace:WaitForChild(player.Name).Head
    elseif player:IsInGroup(7870490) then
        local cloneg2 = bbgFan:Clone()
            cloneg2.Parent = game.Workspace:WaitForChild(player.Name).Head
    elseif HasPass then
        local cloneg3 = bbgVip:Clone()
           cloneg3.Parent = game.Workspace:WaitForChild(player.Head).Head
        end
    end)
end)

1 comment

0

it still doesnt work

This discussion is preserved as it was. New answers, comments, and votes are closed.