StarterCharacter Gamepass

Hello, So I’m trying to make a gamepass that when bought changes the startercharacter, which is different from the original startercharacter. I’ve tried looking at other posts but can’t find the exact solution I’m looking for. I tried using the marketplace service and multiple scripts but none of them would work. Any help or info would be greatly appreciated

I’m not familiar with using the marketplaceservice with a startercharacter, and I’m not looking to use humanoiddescription on this rig. help would be appreciated.

To clear things up I’m trying to make a script that uses marketplaceservice in order to give the starter character a different starter character than the default one.

Original startercharacter:
image

gamepass required startercharacter:
image

1 Like

It would be better if you could just show us the code.

2 Likes

No problem here’s what i tried using

local mpService = game:GetService("MarketplaceService")
local gamepassId = 40131216 --

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local player = players:GetPlayerFromCharacter(character)
		local gamepassCheck = mpService:UserOwnsGamePassAsync(player.userId, gamepassId)
		if gamepassCheck then --user has gamepass
			--this is where the problem came in i've tried multiple stuff but couldn't figure it out
		end
	end)
end)

this is the second script

local Players = game:GetService("Players")
local ServerStorage = game:GetService("ServerStorage")
local MarketplaceService = game:GetService("MarketplaceService")

local DEFAULT_APPEARANCE = ServerStorage.DefaultAppearance

local GAME_PASS_ID = 40131216

local function applyDefaultAppearance(character)
	local humanoid = character:WaitForChild("Humanoid")
	humanoid:ApplyDescription(DEFAULT_APPEARANCE)
end

local function playerAdded(player)
	local success, canBypassDefaultAppearance = pcall(function ()
		return MarketplaceService:UserOwnsGamePassAsync(player.UserId, GAME_PASS_ID)
	end)

	appearance
	if (success and not canBypassDefaultAppearance) or not success then
		player.CharacterAppearanceLoaded:Connect(applyDefaultAppearance)
		if player:HasAppearanceLoaded() then
			applyDefaultAppearance(player.Character)
		end
	end
end

Players.PlayerAdded:Connect(playerAdded)
for _, player in ipairs(Players:GetPlayers()) do
	playerAdded(player)
end

Here’s another attempted fix which still doesn’t work

local MarketPlaceService = game:GetService("MarketplaceService")
local PassID = 40131216 
local StartChar = game:FindFirstChild("StarterCharacter")

game.Players.PlayerAdded:Connect(function(player)
	
	if MarketPlaceService:UserOwnsGamePassAsync(player.UserId, PassID) == true then
		
	local StartCharClone = StartChat:Clone()
	StartCharClone.Parent = game.StarterPlayer
	
	end
end)

There’s also a model named startercharacter in replicated storage but i can’t seem to get it to work

I strongly discourage using StarterCharacter for a game pass character change. Here’s a thread on the same topic that I’ve responded to in the past regarding it:

3 Likes

The problem is that I’m using r15 and humanoid description only supports r6

HumanoidDescription works for any rig type. It was in fact designed with R15 first in mind because R6 is a legacy rig construction - all avatar features are designed R15 first and made to be compatible with R6 unless there are components that R6 rigs do not carry (e.g. avatar animations).

You should test in Studio before being so sure something doesn’t hold.

2 Likes

The problem is the HumanoidDescription doesn’t work for example i change the player head to purple in the properties of humanoid description it doesn’t do anything

If you’re having a problem that you’re looking for help resolving then you should be supplying as much detail about your current setup as possible, not just a vague statement of the problem. Are you really sure it’s HumanoidDescription that isn’t working or is it your use of it that’s wrong?

local description = Instance.new("HumanoidDescription")
description.HeadColor = BrickColor.new("Royal purple").Color
game:GetService("Players"):GetPlayers()[1].Character.Humanoid:ApplyDescription(description)

Changing the properties of a HumanoidDescription does not automatically apply the new description to the character. The description changes are only applied as in when you call ApplyDescription.

3 Likes

Thanks i was having a problem understanding how it works i looked over the developer api and learned so much about it i appreciate your efforts and patience