so i'm experimenting right now to make a game and i have an inventory gui. i have a button that is supposed to move the tool into starter pack but i have a custom backpack, here is the script for it :
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList,false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)
local plr = game.Players.LocalPlayer
local char = plr.Character
local UIS = game:GetService('UserInputService')
local equipped = false
UIS.InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.R then
if equipped == false then
char.Humanoid:EquipTool(plr.Backpack:WaitForChild('ClassicSword'))
equipped = true
else
equipped = false
char.Humanoid:UnequipTools()
end
end
end)
I have the tool as a child in the inventory gui and i made a script so when you click it it moves the tool to starter pack, here is the script :
local slot1 = script.Parent.slot1
local sword = script.Parent.ClassicSword
slot1.MouseButton1Click:connect(function()
sword.Parent = game.StarterPack
end)
It moves the tool to the starterpack, but when i press R it doesn't equip. any help?

3 comments
https://forum.scriptinghelpers.org/topic/82/how-to-format-questions-answers-on-the-main-site
You would want to fire a remote event
And fire server to move the sword to starterpack.