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)
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!
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)