Hello! I’ve been searching for a solution to this problem all day… It turns out that when trying to access certain objects within a folder in the “Player” object, it’s inaccessible through a global script, but it’s clearly visible in the file hierarchy or through a local script.
All of this is also accessible through a global script, except from “pet” downward.
Are the things inside of the player created on the server or client?
The children of the “pets” folder are created by a local script.
They need to be created on the server, if they aren’t they will just create it on the client. I recommend doing something like this
game.Players.PlayerAdded:Connect(function(player)
-- Wherever you created the inventory run this code under it
local pets = Instance.new('Folder', Inventory) -- You need to add this under the inventory code so it parents correctly
-- add rest of pet creation stuff on server as well
end)
1 Like
It seems that you’re a beginner programmer. I advise you to look at this documentation page first:
Your problem is that you’re creating those objects from the client, because of how client-server runtime works, the server is not able to see your objects. Consider creating them from a server script under ServerScriptService.
2 Likes
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.