You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to make a model of an elevator that moves up and down triggered by a ProximityPrompt, where it goes slower than what it is right now (which is lightning speed)
What is the issue? Include screenshots / videos if possible!
I’m sure the way I scripted it it goes to the specific position as fast as humanly possible, but I’m lost as to where I inject code to slow it down
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’m at a loss with this. Maybe instead of * I use + instead? so the CFrame adds the Y-axis movement instead of multiplies it?
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
I’m using the Tweenservice on this one and I’m also trying to make it move a whole Model all at once.
local tweenservice = game:GetService("TweenService")
local model = script.Parent
local door = model.Door
local prompt = model.top.Attachment.ProximityPrompt
local tweeninfo = TweenInfo.new(1)
local goalopen = {}
local goalclose = {}
goalopen.CFrame = door.CFrame * CFrame.new(0, 155.24, 0)
goalclose.CFrame = door.CFrame
local tweenopen = tweenservice:Create(door, tweeninfo, goalopen)
local tweenclose = tweenservice:Create(door, tweeninfo, goalclose)
prompt.Triggered:Connect(function()
script.Parent.sound:Play()
if prompt.ActionText == "close" then
tweenclose:Play()
prompt.ActionText = "open"
else
tweenopen:Play()
prompt.ActionText = "close"
end
end)
Hmm, I’m adding the weldconstraints right now, and it seems that the active check box isn’t able to be pressed. I playtested and the elevator only works if they are checked active, but mysterious forces are blocking my ability to do so.
WeldConstraints are only shown as Active if they are attached to 2 Unanchored Parts.
Since you are welding the Model Parts to an Anchored Part, they show as Inactive, but are still doing their job when the Anchored Part is tweened.
Okay so I tested the anchored tween elevator and the only thing that seems to go upwards is the union piece that makes up the cabin. Everything else (albeit Welded) stayed put. I’m thinking Maybe I unanchor the cabin and have a rope attachment and some guide rails keep it in place?
I’ve had great luck with the elevators in my Steampunk game.
I just use PrismaticConstraints to move the elevator, and it also means you don’t have to weld players to the elevator when it moves, since the physics engine will move a player with a constraint object, but won’t move a player on a CFramed object.