The script in the proximity prompt, no matter how much it’s triggered, won’t make the part move.
local platform = script.Parent:WaitForChild("Platform")
local prismaticConstraint = script.Parent:WaitForChild("Track").PrismaticConstraint
platform.ProximityPrompt.Triggered:Connect(function(player)
print(prismaticConstraint.CurrentPosition)
if prismaticConstraint.CurrentPosition <= -41 then
prismaticConstraint.TargetPosition = 32
else if prismaticConstraint.CurrentPosition >= 31 then
prismaticConstraint.TargetPosition = -42
end
end
end)
I also didn’t modify the script at all and I didn’t change any properties of the prismatic constraint either. I did have to turn off CanCollide for the part named “part” though so the track could slide through it.
Before you take your screenshots go to the Model tab and click the Show Welds and Show Constraints buttons so we can actually see them.
Is the platform Anchored?
Is the platform welded to anything?
Is the print line in the function printing the CurrentPosition? If it isn’t then your Prompt isn’t firing the function.
Is the print line printing a value between -41 and 31? If it is then your ifelseif checks aren’t going to ever work.
Crank up your PrismaticConstraint ServoMaxForce to about a trillion, and for Pete’s sake turn the Speed down. 500 studs per second is wayyyy too high.