✓ Accepted answer
Try this maybe, I think this might work. I made it so that they equip the tool first.
Important Note: Make sure that the property manual activation is unchecked on the tool!
local player = game.Players.LocalPlayer
local tool = player.Backpack:FindFirstChild("Sandwich")
if tool then
tool.Parent = player.Character
tool.Activate()
end
When a player normally selects a tool in their hotbar, it moves it from backpack to the character model. I am pretty sure Tool:Activate() can only be fired when it is equipped already, as activate and equipped are two different things. Equipped makes them hold it, activate makes them use it. You might want to read this page on the developer website all about Tool:Activate().
I hope this helps you!
-ProqrammedGreen
2 comments
tool.Equipped is an event, not a property. So this wouldn't work. Read here: https://developer.roblox.com/en-us/api-reference/event/Tool/Equipped
Although there is a thing called Humanoid:EquipTool but I don't think it's what they're looking for