I made this script to equip a tool on touch as i have backpack disabled and only want the tool to be equipped when entering a specific area.
function onTouched(hit) if game.ServerStorage.Main.Values.ToolEquip.Value == 0 then script.Disabled = true hit.Parent.Humanoid:EquipTool(game.ServerStorage.Main.Parts.R15) game.ServerStorage.Main.Values.ToolEquip.Value = 1 script.Disabled = false end end connection = script.Parent.Touched:connect(onTouched)
connection = script.Parent.Touched:connect(onTouched)
I spent a while getting this to work so any help would be appreciated. Thanks :)