Hey! As you could probably tell by the title, the "PartStorage" model in Zednov's Tycoon Kit keeps on disappearing. Everything works perfectly fine for about 20 minutes and then the PartStorage model disappears and nothing works.
What's the purpose of the game? My game is called "Fruit Farm Tycoon". You purchase a tycoon, the tree grows, then you could purchase fruit for it. The fruit drop from the tree and you could get money. You could purchase additional land to build more fruit trees and eventually a shop to get even more money.
Short explanation of the issue: Please keep in mind that the tycoon kit added the part storage model. So the Core Script, which is listed below, basically is the only thing that includes the PartStorage option. It creates the model and puts it in Workspace. When a dropper drops a part, that will go in the PartStorage model and immediately get removed. When the PartStorage disappears out of the blue, the part has nowhere to go and you don't gain any money, which defeats the whole purpose of a tycoon.
I have no idea what's causing the PartStorage to disappear. I've checked through all of the scripts and none of them would cause it to disappear. I have edited a few parts of the script, but none of them should affect the PartStorage. I have also provided a few scripts below that could play a role in it breaking. I highly doubt it, but hopefully this could help someone come to the conclusion on how to fix this issue.
Core Handler:
local Tycoons = {} local Teams = game:GetService('Teams') local Settings = require(script.Parent.Settings) local BC = BrickColor local Storage = Instance.new('Folder', game.ServerStorage) Storage.Name = "PlayerMoney" local PartStorage = Instance.new('Model', game.Workspace) PartStorage.Name = "PartStorage"
Dropper script:
wait(2) workspace:WaitForChild("PartStorage") while true do local apple = script.Parent.Parent.Parent.Prices.Apple.Value wait(math.random(5, 10)) -- How long in between drops local part = Instance.new("Part",workspace.PartStorage) script.Parent.DropMesh:Clone().Parent = part local cash = Instance.new("IntValue",part) cash.Name = "Cash" cash.Value = apple -- How much the drops are worth part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.4,0) part.Size=Vector3.new(1.2, 1.2, 1.2) -- Size of the drops game.Debris:AddItem(part,20) -- How long until the drops expire end
I tried to catch the issue in the output, but it's not telling me when or what caused it to disappear. When I click the message on the output, it brings me to the dropper script above for the fruit that is trying to go to the storage. Of course it wouldn't work! There isn't a place for it to go! That doesn't help my issue, though. What caused the PartStorage to disappear after like 15-20 minutes after it was working fine until then. The first thing that it says after is disappears is:
20:27:52.419 PartStorage is not a valid member of Workspace "Workspace"
It then says:
20:27:56.772 Infinite yield possible on 'Workspace:WaitForChild("PartStorage")'
The output is just saying that other scripts aren't able to do their job because the PartStorage is gone, but what caused it to disappear?!
Does anybody have any idea on what could be causing the "PartStorage" model to disappear after 20 minutes? It just started to happen yesterday. I didn't even mess with the part storage model. Could it be because there's a mesh in the part to make it a certain design? I'm not sure, but all I know is that it didn't start to happen until yesterday and it has never been an issue before. If you have any idea on how to fix this issue, please let me know!