#Tool.Equipped broken
28 messages · Page 1 of 1 (latest)
i dont know if it's because of this, but i think at
Knife.Equipped:Connect(
you forgot to mention the function
Knife.Equipped:Connect(function()
end)
I thought that too. Sadly, still not working
you mean that the equipped event triggers barely the game loads right?
** You are now Level 1! **
I have no idea why
-
You need to connect and disconnect the .Equipped event connection when the tool is unequipped, it's important to check if the tool is in the character with a cool down before you execute any other code.
-
You forgot that in the UIS function you can't check for .Equipped, because that's an event, not a Boolean, instead check if the tool is inside a character as I said before.
can you show your edited script?
It's triggering the code without I'm equipped with it. Disconnect would make no difference
@west plank ignore these new variables, it's for another thing.
Again, .Equipped is an Event that fires whenever the player equips the tool, you use that event as a function connection (or with the connection itself) to check if the player is equipping the tool.
local isToolEqupieed
Tool.Equipped:connect(function()
isToolEqupieed = true
-- code
end)
Tool.Unequipped:connec(function()
isToolEqupieed = false
You have also ignored the second thing I mentioned, which is checking if the tool is being equipped by the character, which can be more efficient because you don't use any events:
local isToolEquipped = (Tool.Parent == Player.Character) and true or false.
@stuck berry
before being smart can you make sure you spell stuff right
I apologize if you find my spelling bad, it's very easy to miss over a small mobile device with no autocorrect available.
As long as you understand the code it doesn't really matter.
Sorry for the long time to reply. I'm on my way to home. As soon I get there I'll try what u said @hollow rampart
I'm really sorry, I didn't read the second thing you said. I remade some parts of my script with that part u send and it worked 100%. Thank you so much for your time to help me. You helped me a lot.