Help with making a bouncy character script *without* creating instances?
Asked by
2 years ago Edited 2 years ago
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?
01 | local Changed = function (part, PropertyName, func) |
02 | local current = part [ PropertyName ] |
05 | coroutine.resume(coroutine.create( function () |
07 | repeat elapsedTime = elapsedTime + task.wait() until part [ PropertyName ] ~ = current |
09 | local v,v 2 = coroutine.resume(coroutine.create( function () |
10 | return func(part [ PropertyName ] , current, elapsedTime) |
13 | if v 2 = = "stop" then break end |
15 | current = part [ PropertyName ] |
21 | local hum = game.Players.LocalPlayer.Character.Humanoid |
22 | Changed(hum.RootPart, "CFrame" , function (cf) |
28 | Changed(hum, "FloorMaterial" , function (mat) |
29 | if mat ~ = Enum.Material.Air then |
30 | hum.RootPart.Velocity = Vector 3. new(hum.RootPart.Velocity.X, (y-hum.RootPart.CFrame.Y), hum.RootPart.Velocity.Z) |
31 | y = hum.RootPart.CFrame.Y |