how do i script a button to give a player a weapon? i started with this,
function.onClicked ()
give.Player.Item:35702550 onClicked
end
im very new to scripting (i started 3 hours ago) Please help
Put a ClickDetector into the part you want to be clicked. put the weapon you want to give into the ServerStorage
Part = script.Parent -- defines the part Part.ClickDetector.MouseClick:connect(function(Clicker) -- start event when part is clicked local HasWeapon = Clicker.Backpack:FindFirstChild('WeaponName') -- looks for already existing weapon if not HasWeapon then -- prevents from getting more than one local Clone = game.ServerStorage.WeaponName:Clone() -- duplicates the weapon Clone.Parent = Clicker.Backpack -- puts weapon into player's backpack end end)