Im trying to make a StarterCharacter gamepass. When they buy the gamepass they get a in game skin. The script works its just when ever i spawn im invis and i cant move.
The script i used
local GamepassId = (10797682)
local Players = game:GetService("Players")
local MarketplaceService = game:GetService("MarketplaceService")
local ServerStorage = game:GetService("ServerStorage")
local GamepassStarterCharacter = ServerStorage.StarterCharacter
local GamepassFunction = function(Player)
if not Player:IsA("Player") then
return
end
Player.CharacterAdded:Connect(function(Character)
local function LoadCharacter(Path)
for i,v in pairs(Character:GetChildren()) do
v:Destroy()
end
for i,v in pairs(Character:GetChildren()) do
v:Clone().Parent = Character
end
if not Character:FindFirstChildOfClass("Humanoid") then
Instance.new("Humanoid",Character)
end
end
if MarketplaceService:UserOwnsGamePassAsync(Player.UserId,GamepassId) then
LoadCharacter(GamepassStarterCharacter)
else
LoadCharacter(ServerStorage.RedSkin)
end
end)
end
for i,v in pairs(Players:GetPlayers()) do
GamepassFunction(v)
end
Players.PlayerAdded:Connect(GamepassFunction)

5 comments
Could you put the code in a code block? Edit the question, select the code and click the blue "Lua" icon. For more information, click this and scroll to the bottom: https://scriptinghelpers.org/help/how-post-good-questions-answers
I added it for you
i edited it did i do it correectly?
its anchored, weld and your destroying all of it, put destroy the old character then insert new costume because your putting it then destroying.
its not anchored i checked all the parts and the humaniod plus the humaniod root part