Rainbow Group Overhead

I am working on a script, if a user owns a gamepass, it turns the GUI to rainbow or uses a player name, but the player name doesn’t work. The script:

local TweenService = game:GetService("TweenService")
local MarketPlaceService = game:GetService("MarketplaceService")
local VipPlayers = {"YourSnowingDev", "B00PUP"} -- Any person's name put here will get the gamepass for free
local gamePassId = 28000297 --REPLACE THIS WITH YOUR GAMEPASSID
local groupID = 12212248 --REPLACE THIS WITH YOUR GROUPID

local function FindPlayer(Plr)
	for Num, Pler in pairs(VipPlayers) do
		if Pler == Plr then
			return true
		end
	end
end



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
	end)
	player.CharacterAdded:Connect(function()
		if MarketPlaceService:UserOwnsGamePassAsync(player.UserId, gamePassId) or FindPlayer(player.Name) then
			player.CharacterAdded:Connect(function(character)	
			while true do	
				local Rainbow = clone.Frame.Name1
			local Color = Color3.new(math.random(), math.random(), math.random())
			local ColorTween = TweenService:Create(Rainbow, TweenInfo.new(3), {TextColor3 = Color})
			ColorTween:Play()
			wait(3)
			end
			end)
	end
end)
end)

Do you get any errors in the output?

No, don’t think so. Lemme check.

None. I checked, none.

Alright, what folder is this script in?

ServerScriptService sir.

I just copied your code into my game:

local TweenService = game:GetService("TweenService")
local MarketPlaceService = game:GetService("MarketplaceService")
local VipPlayers = {"Cookie_DevX", "B00PUP"} -- Any person's name put here will get the gamepass for free
local gamePassId = 10525616 --REPLACE THIS WITH YOUR GAMEPASSID
local groupID = 10392184 --REPLACE THIS WITH YOUR GROUPID

local function FindPlayer(Plr)
	for Num, Pler in pairs(VipPlayers) do
		if Pler == Plr then
			return true
		end
	end
end



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
	end)
	player.CharacterAdded:Connect(function()
		if MarketPlaceService:UserOwnsGamePassAsync(player.UserId, gamePassId) or FindPlayer(player.Name) then
			player.CharacterAdded:Connect(function(character)	
				while true do	
					local Rainbow = clone.Frame.Name1
					local Color = Color3.new(math.random(), math.random(), math.random())
					local ColorTween = TweenService:Create(Rainbow, TweenInfo.new(3), {TextColor3 = Color})
					ColorTween:Play()
					wait(3)
				end
			end)
		end
	end)
end)

This is what error I got:

Rank is not a valid member of Script "ServerScriptService.Script" - Server - Script:19

This means there was an error inside the script inside line 19.

When I check the line, I’ve seen that your cloning something, could you please send me a file of your model so I can test it for errors!

yes! will do.

Rainbow Overhead GUI.rbxm (6.0 KB)

put it in serverscriptservice

1 Like

Ah, I see the issue, the tag isn’t rainbow, but it clones?

Huh? I have no clue what that means… LOL.

But you wrote the script?

Remember on line: local clone = script.Rank:Clone()

Were you clone the script?

on a users head. 20char

This should do the trick:

local TweenService = game:GetService("TweenService")
local MarketPlaceService = game:GetService("MarketplaceService")
local VipPlayers = {"Cookie_DevX", "B00PUP"} -- Any person's name put here will get the gamepass for free
local gamePassId = 10525616 --REPLACE THIS WITH YOUR GAMEPASSID
local groupID = 10392184 --REPLACE THIS WITH YOUR GROUPID

local function FindPlayer(Plr)
	for Num, Pler in pairs(VipPlayers) do
		if Pler == Plr then
			return true
		end
	end
end



game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function()
		if MarketPlaceService:UserOwnsGamePassAsync(player.UserId, gamePassId) or FindPlayer(player.Name) then
			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
			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
			while true do	
				local Rainbow = clone.Frame.Name1
				local Color = Color3.new(math.random(), math.random(), math.random())
				local ColorTween = TweenService:Create(Rainbow, TweenInfo.new(3), {TextColor3 = Color})
				ColorTween:Play()
				wait(3)
			end
		end
	end)
end)


look at this post… Oh my Gosh what happened

Thanks! I’ll test it out when roblox is back.

The issue is your using

CharacterAdded:Connect

Multiple times, this you were waiting for a character to be added, after its been added.

Oof. Thank you! Will check it out when I can join a game. Look at the post I sent you please.

I tested it, this is the result you get:

Thank you so much! I will test it when it lets me. LOL.