I'm building a machine that when you hold E gives you pizza. The pizza is in server storage and it doesn't give the tool.
The code :
local ProximityPrompt = script.parent.ProximityPrompt
local ServerStorage = game:GetService("ServerStorage")
local serverstoragetool = ServerStorage.Pizza
ProximityPrompt.Triggered:Connect(function(Player)
local tool = serverstoragetool:Clone()
tool.parent = Player:WaitForChild("Backpack")
end)

6 comments
Is this a local script or a server script?
server script
any errors
parent is not a valid member of Tool "Pizza"
use Parent not parent on the line 7
Tysm!