When i press on a table, it should give me a chair from rep. storage, but it doesnt. Here's the script:
function FoldingChair() return game.ReplicatedStorage:WaitForChild("FoldngChair"):Clone() end script.Parent:WaitForChild("ClickDetector").MouseClick:connect(function(player) FoldingChair().Parent = player.Backpack end)
Basically if you click on a click detector it SHOULD give you a folding chair, but it won't work.
The Script works for me, did you missed a typo? you typed "FoldngChair" instead of FoldingChair, Make sure the script is a Script, not a LocalScript.
function FoldingChair() return game.ReplicatedStorage:WaitForChild("FoldingChair"):Clone() end script.Parent:WaitForChild("ClickDetector").MouseClick:connect(function(player) FoldingChair().Parent = player.Backpack end)