#disable a local script when a player is holding a tool

1 messages · Page 1 of 1 (latest)

mortal spade
#

im a begginer scripter with common knowledge i made a combat script so its kinda like tsb yk where its not a tool but its more like a script when i click m1 it punches now when i equip a tool and i try to use it by clicking m1 i also punch so i want it to disable the combat script whenever i have my tool out

bleak berry
#

what i would do is giving the player an Atribute and when the tool is equipt change the atribute

#

the commans you need are

#

Tool.Equipped:Connect(function()
:setAtribute("ToolEquipt",true)
end)
:GetAttribute("TollEquipt")
Tool.Unequipped:Connect(function()
:SetAttribute("ToolEquipt",false
end)

mortal spade
#

where would i put that

#

and how would i make that function with the script

#

im not really the best with Attributes

bleak berry
#

(it simple(i hope)

mortal spade
bleak berry
#

not quiet wait a sec

mortal spade
#

alright

#

if you would like to hop on a vc and help?

bleak berry
#

sure

mortal spade
#

private