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

how to make bullet destroy glass cube ?

I want the bullet to destroy the glass plate. I don't know how to do this, I'm a beginner. If anyone wants, I have no problem, I have ideas :-) .. Thank you in advance for your help

6 comments

0

I would recommend you to try first and then if you don't be able to do it yourself, ask here. Remember the always put the code while asking something.

0

This is not a request site

0

I just don't know how to write the code

0

I see alot of people (in the past) just use a touched function.............dont know if thats the best way though

0

I supose you could animate the object, and the play the animation, or insert decals on the places where the bullet has hit, to make it look like shattered.

0

Can people stop saying "This Is Not a request Site" when an admin hasnt taken it down yet

1 answer

use a .Touched event. it fires when the part hits another.

local debounce=false--leave this here
local part=--your part

part.Touched:Connect(function(hit)
if hit.Name="GlassCube"  and debounce=false then

debounce=true

hit:Destroy()

wait(0.3)--reduce if u want
debounce=false
end
end)

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