#Levitation script for players

1 messages · Page 1 of 1 (latest)

fallow smelt
#
local Debounce = {}

function onTouched(hit)
    if not hit.Parent:FindFirstChildOfClass("Humanoid") then return end

    local hrp = hit.Parent:FindFirstChild("HumanoidRootPart")
    if hrp then
        if Debounce[hrp] then return end
        Debounce[hrp] = true
        
        local attch = Instance.new("Attachment", hrp)
        
        local LinearVelocity = Instance.new("LinearVelocity", hrp)
        LinearVelocity.MaxForce = math.huge
        LinearVelocity.Attachment0 = attch
        LinearVelocity.VectorVelocity = Vector3.new(0, 6.5, 0)
        
        task.wait(6)
        Debounce[hrp] = nil
        
        attch:Destroy()
        LinearVelocity:Destroy()

    end
end

part.Touched:Connect(onTouched)```

My friend helped me with this script cause Im not good with physics but I want it so that when the player levitated they can also move around. If thats even possible.
#

I guess if there is a different type of Velocity i can use or a setting i can toggle

fervent cape
fallow smelt
#

Its basically like supposed to be what happens when u get hit by a shulker projectile in minecraft. Player levitated upwards for a while and then come back down. But while the velocity is in effect the player cant move

#

thats my issue

dense flame
#

so it will only change on the Y axis

fallow smelt
#

ok