So yesterday i asked why it would give tools to everyone. Now it gives infinite tools??
Here's the script
local Part = game.Workspace.BuyPart
local RS = game:GetService("ReplicatedStorage")
local Sword = RS.Tools:FindFirstChild("SpeedCoil")
local Players = game:GetService("Players")
Part.Touched:Connect(function(hit)
local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
if Player.leaderstats.Points.Value >= 500 then
local SwordClone = Sword:Clone()
SwordClone.Parent = Player.Backpack
end
local GravityCoil = RS.Tools:FindFirstChild("GravityCoil")
local Part1 = game.Workspace.BuyPart1
Part1.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if Player.leaderstats.Points.Value >= 7000 then
local CoilClone = GravityCoil:Clone()
CoilClone.Parent = Player.Backpack
end
local Part2 = game.Workspace.BuyPart2
local Tool = RS.Tools:FindFirstChild("PointGiverTool")
Part2.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if Player.leaderstats.Points.Value >= 10000 then
local ToolClone = Tool:Clone()
ToolClone.Parent = Player.Backpack
end
end
end)
end
end)
end)
please help

5 comments
This happen because Touch event can fire multi times when the Player move. To prevent this, we use debounce https://developer.roblox.com/en-us/articles/Debounce
Still does not work.
does not work.
Use a debounce if the tool already exists within their backpack
Do you know the script : -) I'm a beginner