Pre run shop issue

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I’m currently making a pre run shop for my game, and at this stage I’m attempting to make a folder to store what each player has bought using a server script.
  2. What is the issue? Include screenshots / videos if possible!
    For some reason, when I join the game no folders are made (They are supposed to go in the Folder named “Cart”)
    image
    but I also get no errors for that script.
local TemplateCart = script.TemplateCart
local Carts = script.Parent.Cart

game.Players.PlayerAdded:Connect(function(plr)
	TemplateCart:Clone()
	TemplateCart.Name = plr.Name
	TemplateCart.Parent = Carts
end)
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have looked around on the dev forum, but no-one else is making the same style of game as me, so the code doesn’t work with my setup.

Also, if anyone can help me make this server sided, that would be great :slight_smile:

where is the script? if its under StartShop and its localscript, then PlayerAdded won’t be triggered, since localscripts are executed after player has joined, so you can just put the template cloning outside the PlayerAdded

1 Like

You’d need to create the folder (or I recommend using modules and storing cart via script), on server and update the folder when player adds something to cart on server

Ohhh ok. Thanks so much for the help :slight_smile: