Hello. So, i made a Model of a Platform using Parts & Unions. The Model has an unanchored, invisible PrimaryPart which is as big as the Model. All of the unanchored parts in the Model are welded to the PrimaryPart. There are 2 parts in the Model that are anchored, they are “Pos1” and “Pos2”. They are the positions i want the PrimaryPart to move to smoothly.
I used AlignPosition for this, i put an attachment in the PrimaryPart and i set the AlignPosition’s Mode to “OneAttachment”, and i set its Attachment to the Attachment in the PrimaryPart. I then made a script with a “while true do” loop that simply sets the AlignPosition’s Position to “Pos1”'s Position, then 4 seconds later puts the AlignPosition’s Position to “Pos2”'s Position, then 4 seconds later, same thing with Pos1, it’s a loop basically.
Problem is that no matter what i try, nothing works. I tried PrismaticConstraint, didn’t work. Tween, didn’t carry the player. Welding the player to the PrimaryPart (very inefficent), so i then tried AlignPosition using a tutorial (that used a single part, and not a model). Every single dang time i run the game, the Model simply falls. And if i anchor the PrimaryPart, the Model just doesn’t move. I’ve tried absolutely EVERYTHING, from looking through dozens of posts on the DevForum, to asking the AI Assistant, which didn’t help at. all. I simply want the Platform to be able to move AND carry the Player, which is why i’m even using AlignPosition in the first place.
I do not understand why it is so freaking hard to code a simple moving platform Model that moves back and forth. Sigh, anyways, below you will find pictures, a video and the code related to the issue.
Code:
export type Podium = {
_Model: Model
}
local Podium : Podium = {}
Podium.__index = Podium
function Podium.New(Model: Model)
local self = setmetatable({}, Podium)
self._Model = Model
self._Core = self._Model.PrimaryPart
self._Pos1 = self._Model:WaitForChild("Pos1")
self._Pos2 = self._Model:WaitForChild("Pos2")
self._Position = self._Core.AlignPosition
local Debounce = false
spawn(function()
while self._Model do
self:Move()
end
end)
return self
end
function Podium:Move()
self._Position.Position = self._Pos1.Position
task.wait(4)
self._Position.Position = self._Pos1.Position
task.wait(4)
end
return Podium
The Model:
AlignPosition:
(AlignPosition’s Attachment0 is the Attachment in the “Core” part. (AKA the PrimaryPart)
Bug Video: