So basically, with this script I either bounce little to none at all or way too much from large enough heights, what can I do?
local Changed = function(part, PropertyName, func) local current = part[PropertyName] local elapsedTime = 0 coroutine.resume(coroutine.create(function() while true do repeat elapsedTime = elapsedTime + task.wait() until part[PropertyName] ~= current local v,v2 = coroutine.resume(coroutine.create(function() return func(part[PropertyName], current, elapsedTime) end)) if v2 == "stop" then break end elapsedTime = 0 current = part[PropertyName] end end)) end local y = 0 local hum = game.Players.LocalPlayer.Character.Humanoid Changed(hum.RootPart, "CFrame", function(cf) if cf.Y > y then y = cf.Y end end) Changed(hum, "FloorMaterial", function(mat) if mat ~= Enum.Material.Air then hum.RootPart.Velocity = Vector3.new(hum.RootPart.Velocity.X, (y-hum.RootPart.CFrame.Y), hum.RootPart.Velocity.Z) -- the "bounce" part y = hum.RootPart.CFrame.Y end end)
Actuallyyyyyyyy... I figured it out, lol
local y = 0 local hum = game.Players.LocalPlayer.Character.Humanoid Changed(hum.RootPart, "Velocity", function(vel) task.wait() y = vel.Y end) Changed(hum, "FloorMaterial", function(mat) if mat ~= Enum.Material.Air then hum.RootPart.Velocity = Vector3.new(hum.RootPart.Velocity.X, math.abs(y)*0.9, hum.RootPart.Velocity.Z) -- the "bounce" part y = hum.RootPart.CFrame.Y end end)