Overview
Hi everyone! I’m running into a strange issue and could use some help figuring it out. I’ve made a Tool called “Saber” that includes a beam
(with union parts) that should follow invisible clones welded to the tool’s Handle
. The goal is to eventually animate them (e.g. retract/expand), but for now I’m just syncing their position every frame.
However, after equipping the tool and moving around, the beam
parts randomly delete themselves. I have no idea why.
File
Here’s the .rbxm
with everything you need to reproduce it:
Saber.rbxm (49.7 KB)
Just drag it into StarterPack
and test in Play mode.
Intended Behavior
- The
beam
folder contains two union parts. - These parts get cloned (invisible), welded to the tool’s
Handle
, and placed in a folder calledInvisibleAnchors
. - The original union parts stay visible and get their
.Position
updated every frame to match their invisible clone.
How It Works
createWelds
Function:
for _, v in pairs(beam:GetChildren()) do
local clone = v:Clone()
clone.Name = v.Name .. "_Anchor"
clone.Transparency = 1
clone.CanCollide = false
clone.Anchored = false
clone.Parent = anchorFolder
weldParts(clone, tool.Handle)
v.Anchored = false
end
idle()
Sync Loop:
while isIdle and tool:IsDescendantOf(game) do
task.wait()
for _, beamPart in pairs(beam:GetChildren()) do
local anchor = anchorFolder:FindFirstChild(beamPart.Name .. "_Anchor")
if anchor then
beamPart.Position = anchor.Position
end
end
end
The Problem
After a few seconds of equipping the tool (or just moving), one or both of the original beam
parts disappear from the world. They’re not anchored, but no code is destroying them, and they exist inside the Tool and Character.
Observations:
- It’s only the original
beam
parts (the clones are fine). - Happens more often during or after movement/physics events.
- I’ve confirmed it’s not
nil
or renamed — they’re just gone. - No errors in the output.
Questions
- Are there known issues with Unions disappearing when moved via
.Position
? - Is this some internal physics cleanup? Or a side-effect of setting
.Position
on unions that are unanchored? - Should I use a different approach (like constraints or bones)?
Notes
- Unions are not welded — I need to animate them independently later.
- I’m avoiding Motor6Ds for this part of the system.
- The behavior is unpredictable — sometimes both stay, sometimes one vanishes.
Thanks in advance to anyone who has insight or has run into this kind of behavior before!