So i wanted to make a simple tycoon game to learn more about scripting, but i’ve encountered a issue with dropper system. It happened to me before and couldn’t fix so i decided to rescript the entire game xd, but it still doesn’t work. To put you in perspective whenever you buy something it will be in “PlayerBuilt” folder and i want to detect that the dropper is in that folder so i can start creating the parts are going to be sold. I tried everything i could, but i couldn’t fix the issue that it never meets the requirements of the if statement and always just prints the test even though the dropper is in the “PlayerBuilt” folder.
Here is the script and any help would be appreciated so much!
for _, dropper in pairs(CollectionService:GetTagged("Dropper")) do
repeat wait(1)
if dropper.Parent == PlayerBuilt then
repeat wait(1)
local product = Instance.new("Part", DropperParts)
product.Anchored = false
product.CanCollide = false
product.Size = Vector3.new(1,1,1)
product.Position = dropper.NewPartPos.Position
until dropper == nil
else
print("Test")
end
until dropper.Parent == PlayerBuilt
end
*Also this is not the full script, because it has around 150 lines, but i think the rest is not very immportant