This is the purchasing script for my game:
local ServerStorage = game:GetService("ServerStorage")
local Tool = ServerStorage.Tools:FindFirstChild("FullMutatedSolarEclipse")
script.Parent.ProximityPrompt.Triggered:Connect(function(player)
local leaderstats = player:FindFirstChild("leaderstats")
local Cash = leaderstats and leaderstats:FindFirstChild("Orbs")
if Cash and Cash.Value >= 20000 then
Cash.Value -= 20000
local ClonedTool = Tool:Clone()
task.wait(0.1)
local backpack = player:WaitForChild("Backpack")
ClonedTool.Parent = backpack
script.Parent:Destroy()
game.Workspace.Sounds.POP.Playing = true
end
end)
but sometimes when the player equips the tool, it gets deleted after the player has held it for a little (the tools dont have any scripts) and it is prob from this script.
Any ideas why?
** You are now Level 6! **


