How i do make NPC break doors

I was working on a Horror game where the Monster

NPC Breaks into a house break the windows.

  1. What do you want to achieve? Accurate examples and where the script/scripts goes.

  2. What is the issue? How to make an NPC breaking windows or parts.

  3. What solutions have you tried so far? Finding Similar topics but failed.

Also, I’m new so I don’t understand very much scripting.

2 Likes

you can set the part you want to break by touch i guess

local part = part_location
if part then
    part:Destroy()
end

or you can do

local part = part_location
if part then
    part.Transparency = 1
    part.CanCollide = false
end

im unsure if this is what you are talking about.

1 Like

I’m on mobile so I can’t help you that much rn.

Detect if NPC is close enough to window/door

There are multiple ways you can break windows/doors:

Best Solution: Union/Negate

Alternatives:

  1. Manually make the windows/doors consist of multiple parts. Anchor them and then unachor them when they are in a breakable state

  2. Destroy function

  3. Parent to ServerStorage

Tutorials:

There’s probably a plugin for this.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.