Maybe I’ll consider admitting DevForum is actually quite useful…
Anyhow, I’m currently experimenting with TweenService with models and in order to tween my model I must first weld it to a central part. My end goal is to create the Star Wars training room for my Empire project I’m working on with moving platforms like this:
The movement side is fine for me, as it orientates and flips into the orientation required of it. However when it comes to welding this happens:
https://gyazo.com/0a56e4d727c2a51174d6d890eedb4cc8
Which is highly irritating when your trying to create intricate extra details. For reference this is how a platform is set out:
- Ignore SPlatformHandler, that is so the platform can be tweened individually back to its home (as they slot out the walls).
- Ignore the delay, that was for showing purposes, its the fact the smaller orange block gets engulfed.
The “Centre” currently is just a box which engulfs the entirety of the model itself, it is also the primary part. My welding script is being done through the ServerScriptService and looks like this:
function WeldModel(Model)
local Part1 = Model.PrimaryPart
for _, Part0 in pairs(Model:GetChildren()) do
wait()
if Part0 ~= Model.PrimaryPart and Part0:IsA("BasePart") then
local Weld = Instance.new("Motor6D")
Weld.Part0 = Part0
Weld.Part1 = Part1
Weld.Parent = Weld.Part1
Weld.Part0.Anchored = false
end
end
end
for _, Model in pairs(workspace.Platforms.Unused:GetChildren()) do
wait()
WeldModel(Model)
end
Any ideas as to why?