#AssemblyLinearVelocity does work with no collision, trying to make elevator

1 messages · Page 1 of 1 (latest)

burnt sky
#

Im trying to make an elevator that brings you up when your in a part but since Velocity was removed and AssemblyLinearVelocity does not work with no collision objects im kinda of strugguling with what to do.

local part = script.Parent


part.Touched:Connect(function(hit)
    local character = hit.Parent
    local humanoid = character:FindFirstChild("Humanoid")
    if humanoid then
        local root = humanoid.RootPart
        if root then
            local touching = true
            while touching == true do
                if part.TouchEnded == true then
                    touching = false
                    root.AssemblyLinearVelocity = Vector3.new(0,0,0)

                end
                root.AssemblyLinearVelocity = Vector3.new(0,1,0)


                task.wait()
            end
        end
    end
end)```

This is the script I had when I wanted to move the root part instead for a workaround and ive tried diffrent ways with the script but its always really buggy and not what I want at all
languid portal
#

I don't think it is a good idea to use velocity

#

Use tweenservice instead

burnt sky
languid portal
#

Use the HumanoidRootPart

burnt sky
# languid portal Use the HumanoidRootPart

So I made the script and it was super duper hard but now I dont really know how to make it so once they reach it then it stops and like the time to reach it is 1 no matter how far away from the top they are so the movement isnt really linear

#

this is the script I made though

local touching = false
local tweenservice = game:GetService("TweenService")
local targetposition = script.Parent.Parent.target.Position

part.Touched:Connect(function(hit)
    local character = hit.Parent
    local humanoid = character:FindFirstChild("Humanoid")
    if humanoid then
        local root = humanoid.RootPart
        if root then
            local touching = true
            while touching == true do
                touching = false 
                local tween = tweenservice:Create(
                    root, TweenInfo.new(
                        1,
                        Enum.EasingStyle.Linear,
                        Enum.EasingDirection.In,
                        -1,
                        true),
                    {Position = targetposition})
                tween:Play()
                touching = false


                task.wait()
            end
        end
    end
end)```
languid portal
burnt sky
#

but I dont get how that would help either way with the issue I have with this

languid portal
#

Wait

#

HmanoidRootPart is on the character NOT the humanoid

#

So Character.HumanoidRootPart

burnt sky
#

Its not like a bubble elevator

languid portal
#

Hmm, not sure

burnt sky
#

wait

burnt sky
solar dawn
slender mesa
#

idk if this is what you want

#

but i have made this using zoneplus module