A force fields in a object without a Torso renders at origin

It’s quite annoying seeing the force field effect being rendered at 0,0,0 because it’s parented to something without a torso part in it.

local Model = Instance.new("Model", workspace)
local Part = Instance.new("Part", Model)
Part.Anchored = true
Part.CFrame = CFrame.new(10, 10, 10)
Instance.new("ForceField", Model)
1 Like

I’d say the issue is more that forcefields display when they’re not in a character or a BasePart. I think it’s appropriate for them to show up when, if not parented to a character, they’re parented to a BasePart. But yes, if they’re not parented to either a character or a BasePart they shouldn’t really show up.

I would like to extend this by saying all objects that produce particles (ParticleEmitter, Fire, Sparkles, ForceField, Smoke, etc) should not render unless they are parented properly. (They should not render at all in all situations where they render at (0,0,0) now.)

Put this around your code (they’re 3 backquotes by the way)

```lua
(your code here)
```

Why shouldn’t they render?

Same reason something with Adornee==nil shouldn’t render. If a particle isn’t adorned to anything, there’s nothing connecting it to 3D space, and it shouldn’t be rendered. No useful behavior comes out of rendering them at <0,0,0>, and it just causes unintended appearances of particles.

I don’t see any connection between “has no parent” and “does not render”. The fact that particles need a parent part to get the position/orientation/size from does not automatically imply (as in non sequitur) that the absense of such parent must cause the particles not to show up.

Unparented partcile emitters are an anomaly; the game must have all its emitters parented to parts. (Except for forcefield which is specifically designed to only work on the characters.)

Useful behavior here is that this is a soft indication of a fact that you have such an anomaly which you should fix.

Can we have a different indication then? Problems with the current soft indication:

  • I could have the particle parented anywhere (even deep in some arbitrary hierarchy) and not be able to find where it is to fix it
  • Players in my game are also given indication that particles are accidentally parented somewhere awkward as opposed to just me
  • I might not even notice them at the origin if it’s covered by part of my map, or my level is far away from the origin

Maybe something similar to the Physics Analyzer plugin? Clicking on items in the analyzer could select them in the explorer for me (no issue finding them). It could also be expanded to work with various things that aren’t parented properly e.g. a model in Lighting.

I tend to use forcefields to prevent things from being destroyed by explosions :
Maybe give us a way to protect things from explosions that doesn’t use the effect?

Like setting DestroyJointsRadius to 0 and using the hit event to break the joints of anything you want to explode?