Once Game Pass is purchased I'm not seeing it in my backpack

I followed a you tube tutorial to learn all of this, I am self teaching myslef alot from scratch, so yes I am very new to learning all of this. I have also hired a tutor to help me learn the Lua programming but I’m not that advanced yet. I meet with my tutor once a week but we have not gotten this advanced in my class yet. I’ve learned all of this on my own. I hired a tutor because I wasn’t getting the hang of scripting on my own without the aid of watching a you tube tutorial and I wanted and needed to be able to do it. This is why I am also a member of the developer forum so I can ask for help when needed.

I already noticed the red line under Body Position but the pet does indeed work, even with that red line. I already properly set the pet up to follow me in game without a purchase, without selling it in the game for Roblox so I know the pet works. But I want to sell the Pet in my game instead of giving it for free.

Everything I did here on my own following the tutorial that someone provided via youtube. I do all the work, it is how I am teaching myself. I learn by doing. I’ve spent many many many many hours teaching myself the past few months.

The issue is getting the pet to appear into my backpack once the purchase is made, this is not happening. I am able to make the purchase, I’ve clearly explained all of this in very good detail.

You paid a tutor for Lua you don’t need to do that is very easy to learn. Anyway one of the errors is from the bodyposition thing. And I think the rock one is erroring because you called waitforchild and put an instance as the parameter instead of a string.

Can you please give me details just like I gave you ? When u write it in a couple sentences like you did it really does not help me understand. I need details.

local owner = newPet.player.ID
workspace:WaitForChild(owner) -- error 
workspace:WaitForChild(owner.Name) -- success because you put in the objects name

Thats for the rock pet btw

Still didn’t work

local newPet = script.Parent

newPet.CanCollide = false

newPet.Anchored = false

local petPos = Instance.new(“BodyPosition”, newPet)

local petGyro = Instance.new(“BodyGyro”, newPet)

petGyro.MaxTorque = Vector3.new(900000,900000,900000)

local owner = newPet.ID.Value

local followPosition = Vector3.new(.5,.5,0)

while wait(1)do

local ownerObj = workspace:WaitForChild(owner.Name)

local player = game.Players:FindFirstChild(ownerObj.Name)

local ownerPos = ownerObj.HumanoidRootPart.Position

local stopAt = ((ownerPos - newPet.Position).magnitude-1)*1000

petPos.P = stopAt

petPos.Position = ownerPos + followPosition

petGyro.CFrame = ownerObj.HumanoidRootPart.CFrame

end

Neither did this. If I run a server test, I am able to click and buy the gamepass and the explorer window now shows it in my backpack but my screen does not show it so the item isn’t being provided.

local newPet = script.Parent

newPet.CanCollide = false

newPet.Anchored = false

local petPos = Instance.new(“BodyPosition”, newPet)

local petGyro = Instance.new(“BodyGyro”, newPet)

petGyro.MaxTorque = Vector3.new(900000,900000,900000)

local owner = newPet.player.ID

local followPosition = Vector3.new(.5,.5,0)

while wait(1)do

local ownerObj = workspace:WaitForChild(owner.Name)

local player = game.Players:FindFirstChild(ownerObj.Name)

local ownerPos = ownerObj.HumanoidRootPart.Position

local stopAt = ((ownerPos - newPet.Position).magnitude-1)*1000

petPos.P = stopAt

petPos.Position = ownerPos + followPosition

petGyro.CFrame = ownerObj.HumanoidRootPart.CFrame

end

This is my output error

Thats an error with the PetPos idk why its erroring that though I’ve never seen that error before.

Is replicated storage the correct place to put the pet ? Also does the pet have to be a Tool, someone above told me it had to be a Tool ?

If you want it to go into your backpack and be something you can hold out and use then yes it will have to be a tool.

No I don’t want to hold it. Its a pet that will follow the player around.

Oh okay then but why does that person say it needs to be a thing in replicatedstorage. If your cloning it from a serversided script then it shouldn’t be a problem where the pet is.

I thought because every player needs the ability to purchase it. So it sits there until the purchase is made.

Okay wait but since you want the thing purchased to go into your backpack then why aren’t you using a tool?

I tried that when the first person who replied told me to make it a Tool. I changed both of the pets to a tool, but it also did not work.

I am gong to provide more than one pet for purchase. If a player buys more than one pet, they need a place to sit while the player is not using them, I thought this was the backpack ?

When you changed it to a tool did you update the script so it would actually work with a tool?

I messed with the script, but it is very possible my tweaks were wrong.

That may be the case but I don’t know how to deal with that utf error sorry. But you may want to take the error and search it up on google and see what solutions other people had.

Ok. Thanks for trying.

This is why I have a tutor. Too many issues keep happening on things I try to do and there never seems to be a fix or solution.

Part of that is because I haven’t learned the coding and scripting yet on a level that I can write it without worrying about why it isn’t working.

The other side is when I search for answers or help I can never find answers or solutions.

You probably should learn how basic things work so you can script your own version of this so it won’t confuse you. If you want to learn while your tutor is offline you can watch these youtubers and videos.