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

Bullet Being Created Multiple Times?

So I was trying to make a gun on roblox. I used instance.new to make the bullet but the instance fired multiple times. Can someone help me out? Please Respond as soon as possible.(here is the code)

local Players = game:GetService("Players")
local player = Players.LocalPlayer
local mouse = player:GetMouse()

script.Parent.Activated:Connect(function()
	
	
	mouse.Move:Connect(function()
		mouse.Button1Down:Connect(function()
			local Bullet = Instance.new("Part")
			wait(2)
		Bullet.Parent = workspace
			    Bullet.CFrame = mouse.Hit
			
		end)	
	end)
end)

1 comment

0

Please answer i really need this. It would mean a lot.

1 answer

✓ Accepted answer

Hmmm, maybe try waiting 5 seconds and put self:Destroy() ?

I'm not sure if this'll work, but it's worth a try

3 comments

0

That Might work ill try that

0

did it work?

0

Kinda, it's still a bit laggy but it works

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