Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how to make bullet destroy glass cube ?

Asked by 5 years ago

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

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. User#27525 1 — 5y
0
This is not a request site BashGuy10 384 — 5y
0
I just don't know how to write the code vatioreno 3 — 5y
0
I see alot of people (in the past) just use a touched function.............dont know if thats the best way though ForeverBrown 356 — 5y
View all comments (2 more)
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. AndriusTheGreat 140 — 5y
0
Can people stop saying "This Is Not a request Site" when an admin hasnt taken it down yet Vortex_Vasne 89 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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)

Ad

Answer this question