Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Tool destroying not working in GamePass script?

So, I'm trying to make a script where if you own a GamePass, you get a bazooka, and get to explode a volcano. Here is my script:

local market = game:GetService("MarketplaceService")
local ID = 6089351
game.Players.PlayerAdded:Connect(function(p)
	p.Chatted:Connect(function(msg)
	if msg:lower() == ":volcano" then
	if market:UserOwnsGamePassAsync(p.UserId, ID) then
		while true do
			local Lava = Instance.new("Part", workspace.Volcano)
			Lava.Position = workspace.Volcano.Explode.Position + Vector3.new(0,5,0)
			Lava.Anchored = false
			Lava.Material = Enum.Material.Neon
			Lava.Color = BrickColor.new("Br. yellowish orange").Color
			local Force = Instance.new("VectorForce", Lava)
			local ForceAttachment = Instance.new("Attachment", Lava)
			Lava.Touched:Connect(function(hit)
				hit:Destroy()
			end)
			Force.Force = Vector3.new(0,1000,0)
			Force.Attachment0 = ForceAttachment
			wait(0.1)
		end
	else 
		market:PromptGamePassPurchase(p, 6089351)
		p.Backpack.bazooka:Destroy()
	end
	end
	end)
end)

The problem is, the bazooka is not destroying. The volcano is working, just not the bazooka destroying. (P.S. I have other scripts, they're working, just not this bazooka one.)

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.