I am a scripter who uses TweenService, but for an obby I need to use BodyPosition. (So that players stick to the block)
The only problem is that when I tell it to go to a set position it does not go to that position, instead it goes to another spot. Please help!
The script:
local Model = game.Workspace.MoveModel
local BodyPosition = Model.Platform.BodyPosition
while true do
BodyPosition.Position = Model.Start
wait(4)
BodyPosition.Position = Model.End
wait(4)
end
It’s pretty easy if you go to the roblox.developer.com page PrismaticConstraint | Documentation - Roblox Creator Hub and read up there.
Click on the add constraints tool in the Model tab in Studio, select PrismaticConstraint, and then click on one Anchored Part as the base for your slider. Click on the Platform you want to move to Attach the other end of the constraint there. Make sure both are aligned in a straight line.
Make sure the Platform isn’t Anchored.
Set the ActuatorType of the Prismatic to Servo.
Set your Speed and ServoMaxForce in the Properties page as well.
Use your looping script to set the TargetPosition for the position the PrismaticConstraint will be at when the platform is at its destination, wait, then set the TargetPosition for the platform’s original position to send it back there, and wait again.