So I tried to make this vending machine script where if I press on it, it moves a soda can tool into starterpack. Im fairly new to scripting and its not giving me errors in the output.
local soda = script.Parent.Soda
local ClickDetector = script.Parent.ClickDetector
local vendingMachineClick = function()
soda.Parent = game.StarterPack
end
ClickDetector.MouseClick:Connect(vendingMachineClick)

1 comment
If you're trying to give it to the player who clicks, put it in the players backpack