Ruinable
|
  |
| Joined: 14 Sep 2014 |
| Total Posts: 8903 |
|
|
| 18 Dec 2014 03:12 PM |
can someone make this cleaner, using freefall function etc, etc? I have a double jump function and now it doesn't work well and I'm trying to make my FPS script. It would be greatly appreciated.
local p = game.Players.LocalPlayer repeat wait() until p.Character local c = p.Character local hum = c:WaitForChild("Humanoid")
function HudFix() local hud = script.Parent local x = 0 hud:TweenPosition(UDim2.new(.01, 0, 1, -185), "Out", "Quad", .3, true) end
function HudJump() local hud = script.Parent local i = 0 hud:TweenPosition(UDim2.new(.01, 0, 1, -150), "Out", "Quad", .3, true) wait(.4) HudFix() end
while true do repeat wait() until hum.Jump == true HudJump() wait(.3) end
Mr. Mustachio | ( ͡°╭͜ʖ╮͡° ) |
|
|
| Report Abuse |
|
|
KillCity
|
  |
| Joined: 22 Mar 2012 |
| Total Posts: 383 |
|
|
| 19 Dec 2014 04:43 AM |
local p = game.Players.LocalPlayer repeat wait() until p.Character local c = p.Character local hum = c:WaitForChild("Humanoid")
local hud = script.Parent
function HudFix() hud:TweenPosition(UDim2.new(.01, 0, 1, -185), "Out", "Quad", .3, true) end
function HudJump() hud:TweenPosition(UDim2.new(.01, 0, 1, -150), "Out", "Quad", .3, true) end
hum.StateChanged:connect(function(_, state) if state == Enum.HumanoidStateType.Jumping or state == Enum.HumanoidStateType.Freefall then HudJump() end if state == Enum.HumanoidStateType.Landed then HudFix() end end)
may or may not work idk |
|
|
| Report Abuse |
|
|
Ruinable
|
  |
| Joined: 14 Sep 2014 |
| Total Posts: 8903 |
|
|
| 19 Dec 2014 11:53 AM |
works, thank you
#ScriptMasterRace |
|
|
| Report Abuse |
|
|