while wait() do -- If the following lines are "true" then process them.
script.Parent.Velocity = script.Parent.CFrame.RightVector *script.Parent.Speed.Value
end
How could I fix my chairlift, or at least make it go up?
Anything is welcome!
Don’t use while wait() do, or even wait() as it’s deprecated. Velocity is also deprecated. I also don’t know why it’s multiplying by the RightVector.
I recommend using a different script, assuming that this one is from a tutorial as it’s probably not a great tutorial. If you made it, could you explain why it uses RightVector?
I now changed the way my conveyor works, using the new AssemblyLinearVelocity, but still, my chairlift doesn’t manage to make it up the steeper part (same steepness as in the video). Any tips?
You might consider finding a way to reduce the amount of time that the CSG comes in contact by the edge. If my 2015 physics attempts have told me anything, edges are the bane of the engine’s existence, rather than collision like others.
As far as I could see, your chairlift is using a very large set of four CSG bricks (good job on not Unioning them for this), which are colliding with the edges and causing that dreaded jumping which stops velocity.
My other suggestion would be to use the new live unions to attach the chair to the cable when moving, which is actually how the real lifts tend to work… except they aren’t magically fusing together.
On the first, the top section is unioned to the ‘wire’ with a ‘pivot’ below to allow movement of the car itself.
On the mid, the top section is not unioned, and moves freely wherever you want it going (in this case, a slow and circular track at the top and bottom) on a level surface.
The last shows the non-unioned being separate parts, itsself.
Note that the non-unioned does not have a ‘pivot,’ since it’d be of no use for the car to swing whilst passengers attempt to board.
The red brick is solid, and it has been unioned to the wire. There is a hinge of sorts (my last experience with hinges was the surface varient) to allow the ‘car’ or ‘chair’ to rotate freely to gravity.
The green brick is the same concept as you currently have, which would make the ‘car’/‘chair’ static and would allow the brick to follow a path.
Why would I want my chairlift to be unioned to the wire though? The whole concept of a chairlift is to make it… Alright I guess they’re “unioned” to the wire in real life, but it’d be really difficult to make the wire move and have my chairlift be on top of it like they do in real life.
I currently have my chairlift be strapped really tightly around my wire though, and have the wire have a velocity to attempt to drag the touching parts along with it. Which doesn’t work…
There is this really good example gamehttps://web.roblox.com/games/2719560806/Single-Chair-ski-lift-development-place?
(use the example chairlift in the image to see how it works)
Then a script loops through all my “Track” (I should’ve named them Conveyor or Wire, but whatever) parts and gives them a velocity which perfectly goes from AttStart (where the velocity goes from) to AttEnd (where the velocity goes to)
for _, d in pairs(script.Parent:GetDescendants()) do
if d:IsA("BasePart") then
local conveyor = d
local attStart = conveyor:FindFirstChild("AttStart")
local attEnd = conveyor:FindFirstChild("AttEnd")
local function setVelocity()
local direction = attEnd.WorldPosition - attStart.WorldPosition
local conveyorVelocity = direction.Unit * conveyor:GetAttribute("Speed")
conveyor.AssemblyLinearVelocity = conveyorVelocity
end
conveyor:GetAttributeChangedSignal("Speed"):Connect(setVelocity)
conveyor:GetPropertyChangedSignal("Orientation"):Connect(setVelocity)
setVelocity()
end
end