Ad
Log in to vote
0

How to make a certain amount of tool clone?

Asked by
A_quib -3
3 days ago

You know, you can make a tool clone by using tool:Clone() and what I'm trying to do is like everytime you touch a part it clones a tool and gives you it. But when I touch the part it like clones the tool like 9-10 times and gives it to me but I want the tool to clone only one time and then make it give the tool clone to me.

3 answers

Log in to vote
0
Answered by 3 days ago

Just make the .Touch part checks if player already has the item then clone if not

Ad
Log in to vote
0
Answered by
Xyternal 145
3 days ago
Edited 3 days ago

So your problem is simple. All you need to do is add a little debounce. Sample code is below.

local debounce = true
part.Touched:connect(function()
if debounce then
debounce = false
print("hi")
wait(2)
debounce = true
end)


Log in to vote
0
Answered by
FrindowYT 283 Moderation Voter
2 days ago

This is very simple to fix. You can either use debounce or wait. They should both easily fix this issue.

Answer this question