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

By any chance, did you copy and paste the code for the rockscript from something that formats what you type? The error that you are having on line 7 is caused by (as odd as this may sound) not having the correct quotation marks. You have a left double quotation mark (U+201c), not a quotation mark (U+0022). If you remove the quotation marks in the script and then replace them while in Roblox Studio’s built in script editor, it should fix the issue.

Yes I had copied and saved the script outside of my Roblox Studio to Notepad++ to save so I would not lose it. I did this before I began making changes to it trying to get it to work.

Then when I was tweaking the code one day trying different things to get this to actually work, and my code ended up looking very foreign and was totally not working, I went and grabbed my original from notepad++ and moved it back over.

Always good to have a backup! It has been quite a while since I used Notepad++ so unfortunately I cannot tell you exactly when this issue occurred, or even if Notepad++ was the issue. However, if it gives you the option to specify that you are working with Lua, and to save the file as a Lua script, I would recommend that you do so. Otherwise, it might try to format it as something different, and you could end up with odd errors such as this one.

I fixed the quotes. I think it happened when I was messing with fixing the blue underline that was showing on Body Position b/c I suddenly had double quotes around it and I had to delete one set. I may have jumbled something up at that time.

The backpack is showing up now but the pet still does not appear when I click on it.
I’ve attached a screenshot and at the bottom in the number 1 slot is the rock pet. But if I click it nothing happens, the pet does not show up. I’ve already gotten to this point before. I don’t know what to do to get it working. I feel like its probably something very simple maybe with script or the setup of the pet its self.

Do any errors show up when you click on the pet in the backpack/press “1” on the keyboard?

No errors pertaining to that when I click it or choose 1. The error that is showing I am aware of, its dealing with a car spawn and it isn’t seeing the carb in workspace yet b/c it hasn’t been spawned yet.

Well at least it shows up in your backpack. Would you mind posting the script one more time? The one that specifically pertains to this pet?


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

Ok, so once you have the pet in your backpack, what is the newPet.ID.Value equal to?

She/he doesn’t know since she/he followed a tutorial off youtube.

I tried tweaking this the other day and never got it to work

is it

local newPet = Players.Backpack

That may be true, but everybody has to start somewhere. It should be fairly easy to figure out what the value is. To do so try equipping the pet, then go to the explorer window, find your character inside of Workspace, then find the pet inside of the character. Find the value object (named ID), inside of the pet, click on it, and it should tell you what the value of it is.

If newPet is supposed to be the pet itself, it should not be set to equal Players.Backpack (that’s saying that the pet is Players.Backpack).

Ok, what I found is that I had the Tool inside of Replicated Storage but my pet wasn’t inside the tool, my first screen print of explorer shows this. So i stopped my game and reformated by putting my pet inside the Tool. My second screen print shows it there but I don’t see anything in the id field. & now I have errors.

screenprintc

Well maybe all the you tube tutorials should be taken down then if we aren’t suppose to use them. :confused:

When did i say we shouldn’t be supposed to use youtube tutorials.

Would you mind showing line 19 of rockscript? Or a screenshot of the script itself?

EDIT: From what I can tell line 19 is when it tries to access the name of that one value. The problem is that value is never set. Is there some other script that tries to set that value?

No, the value was used I think for a totally different script that would of had the pet follow around without having to buy it. If I entered the username/player name into the value field. I have not written it into any script at all. It could probably be deleted all together. I kept playing with that line in the script the other day thinking I might be able to work with it and fit it in.

the line i was trying to tweak was 13

Try replacing line 19 with:

local ownerObj = script.Parent.Parent.Parent

And see if anything changes when you equip the pet.

No change

Ah I see, the script is running inside of your backpack. Try placing the entire contents of the script inside of this:

script.Parent.Parent.Equipped:Connect(function()
--Your code here
end)