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

My Part prints 'Bruh' when I touch it, but not in other cases. How do I fix this?

I have a gun that shoots a projectile (It clones the projectile and then sets bodyvelocity to go in the direction of the cursor)

The original projectile prints 'Bruh' whenever I touch it or drop a part on it, but the cloned projectiles that my gun shoots out dont print 'bruh' whenever they touch anything. (Cancollide on the projectile is off)

local Boop = script.Parent
local function sayhi()
	print("bruh")
end

Boop.Touched:Connect(sayhi)

Does anyone know what the cause of this is, and how can i fix it?

1 comment

0

When you clone the projectile or so, be sure the script is in it so it gets cloned as well

2 answers

Debounce may be the problem you may need to fix. You may also have need to turn cancollide on.

Or do a wait(1)

1 comment

1

Can collide doesn't have to be turned on.

A wait should fix it wait(1)

2 comments

0

You almost copied my reply

0

Sorry, but this sometimes developers have the same idea.

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