What is the parent of Portal? (P.S. Workspace is deprecated, you should use workspace)
Edit: Sorry, reading it more closely now, you did use workspace correctly. My bad! You should try both of these things:
• Making a variable for the Price value
• Maybe try inserting a wait for the Price?
This could just be me being a stickler for organization, but if possible maybe rename the portal and create a variable for it? That way you have the portal as a variable and could try making a separate variable for the price value using a wait like @Ae_xxie suggested. Usually I don’t tend to have this issue when I do it this way
Is the Archivable property of the value set to false?
If yes this is the issue, when you create a game and set any Instance’s Archivable property to false they will not load to roblox’s (test) servers they would only be visible in roblox studio.
Read more here:
This property determines whether an object should be included when the game is published or saved, or when Instance:Clone is called on one of the object’s ancestors. Calling Clone directly on an object will return nil if the cloned object is not archivable. Copying an object in Studio (using the ‘Duplicate’ or ‘Copy’ options) will ignore the Archivable property and set Archivable to true for the copy.
I highly suggest using the Archivable property even though it can be annoying. It is a very useful tool when you want specific instances visible in studio.
I have seen this issue before, no solution was found. Did some digging around a few posts. Like this one or this.
Even this post from around 2018. My conclusion to this is that this is that this is either a studio bug or any script (could be a virus from a free model) is destroying the instance.
I suggest if you want to keep using the current way you’re getting the price to make a completely new value and renaming it “Price” again and then retry until it works, else try again by doing the same steps, but instead of naming it “Price” call it something else.
Though the best way you can do this is by adding an attribute called “Price”, you can retreive this by using instance:GetAttribute("Price") and change this by using instance:SetAttribute("Price", value).
If you wish to give an instance an attribute inside studio just scroll down in the Properties tab then press on the big “Add Attribute” button under “Attributes”
Then the following screen pops up and you want to set the attribute’s Name and Type of attribute.