I'm trying to make it so that when a player presses E, a tool goes into their toolbar, but when I run this code and press E, in the explorer the tool is in the starter pack but not in the toolbar. (This is in a local script inside StarterPlayerScripts)
local Demo = game.Workspace.Demo
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
Demo.Parent = game.StarterPack
end
end)

8 comments
Thanks, this put it in the backpack, but when i equip it my player goes to the position where i put the tool in the workspace. Do I fix this by putting it in ReplicatedStorage or doing something else?
Yes, you should put it into replicatedstorage/lighting/serverstorage or something :)
I put it in ReplicatedStorage but it still goes to the tool's position.
That's strange. Did you make the tool or is it a model?
I set it as a tool and put a part named "Handle"
Also, I recommend changing the grip position and position of the tool, that may also help. If it's a model, the script may be outdated
I'll try that.
Also, I did the same thing myself, I made a part in workspace, named it handle, put it into a tool named demo and everything worked fine