#Script won't work because of the script.Parent.Equipped == true, any help?

5 messages · Page 1 of 1 (latest)

blissful falcon
#

you should do script.Parent.Equipped:Connect(function()
equip = true
end

#

and check if equip is true

copper mulch
#

Not sure how it would "conflict" but binding the Equipped and Unequipped events to set a boolean value to determine if the tool is equipped is completely reasonable. Furthermore, keypress events from the Mouse object is deprecated I believe. I would use the UserInputService instead.

#

Equipped isn't a property (much less one with a boolean return value) it's an Event

#
local equipped = false

-- ... other code junk

script.Parent.Equipped:Connect(function()
  equipped = true
end)

script.Parent.Unequipped:Connect(function()
  equipped = false
end)