generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Whats wrong with this thrust jump script?

Previous Thread :: Next Thread 
Jackbuilder02 is not online. Jackbuilder02
Joined: 01 Mar 2012
Total Posts: 204
08 Sep 2015 11:30 PM

Ok, so this script is supposed to work like this:
You press Cntrl and you boost into the air. When you release cntr you fall.
That part works.
BUT, I have a meter gui so when you boost you run low on meter. (and eventaully, the meter runs out and you cant boost anymore)
There is supposed to be about 2 second wait time before the meter recharges.
BUT, the value isnt changing I have it set to. Even though Im telling it to, and of course, the value controls the meter gui.
Whats wrong with this?
--------------------------------------------Script Start line
local Tool = script.Parent

Me=game:service("Players").LocalPlayer
Char=Me.Character
Mouse=Me:GetMouse()
potato=script.Parent
hold=false
Char:MoveTo(Vector3.new(0,5000,0))
local fuel = Tool.CurrFuel.Value
local maxFuel = 100
local regen = false

function GoUp()
hold=true
incr=0.25
if Char:FindFirstChild("DaForce") == nil then
bp=Instance.new("BodyPosition",Char.Torso)
bp.maxForce=Vector3.new(0,math.abs(Char.Torso.Velocity.y+(10^4*6)),0)
bp.position=Char.Torso.Position
bp.Name='DaForce'
end
while hold do wait()
if incr < 11 then
incr=incr+0.6
end
pcall(function() bp.position=Char.Torso.CFrame*CFrame.new(0,incr,0).p end)
end
for _,v in pairs(Char.Torso:children()) do
if v:IsA("BodyPosition") then
v:Destroy()
end
end
end
Mouse.KeyDown:connect(function(lol1)--when its on
if lol1 == string.char(50) and fuel > 0 then
GoUp() wait()
fuel=fuel-1
end
end)
Mouse.KeyUp:connect(function(lol1) --When its off
if lol1 == string.char(50) then
hold=false wait()
regenFuel()
end
end)

function regenFuel()

while regen and hold==false do
if fuel < maxFuel then
wait(2)
fuel = fuel + 1
Tool.CurrFuel.Value = fuel
updateGUI()
end
wait(0.2)
end

end

function updateGUI()

potato.Frame.Size = UDim2.new(0,40,0,300 * (Tool.CurrFuel.Value/maxFuel))
potato.Frame.Position = UDim2.new(0.9,0,0.2 + (0.2 * ((maxFuel - Tool.CurrFuel.Value)/maxFuel)),0)

end




Why front flip when you wash noodles?
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
08 Sep 2015 11:30 PM
Its free modeled thats why



http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$373 Tx1,984
Report Abuse
Jackbuilder02 is not online. Jackbuilder02
Joined: 01 Mar 2012
Total Posts: 204
08 Sep 2015 11:30 PM
ALSO, I'm getting ZERO errors.


Why front flip when you wash noodles?
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
08 Sep 2015 11:31 PM
Why not just switch the Humanoid.Jump = true??
Report Abuse
Jackbuilder02 is not online. Jackbuilder02
Joined: 01 Mar 2012
Total Posts: 204
08 Sep 2015 11:32 PM
^^ Some parts of the script "CurrFuel" I copied because I wasnt understanding how you can make a value control a gui. Now I do (thanks to the fm)
But, there actual boost part isnt.


Why front flip when you wash noodles?
Report Abuse
Jackbuilder02 is not online. Jackbuilder02
Joined: 01 Mar 2012
Total Posts: 204
08 Sep 2015 11:34 PM
Because I dont want it like that. I like Cntrl, the spacebar is going to be for normal jumps.


Why front flip when you wash noodles?
Report Abuse
Jackbuilder02 is not online. Jackbuilder02
Joined: 01 Mar 2012
Total Posts: 204
20 Oct 2015 04:19 PM
bump


Why front flip when you wash noodles?
Report Abuse
Jackbuilder02 is not online. Jackbuilder02
Joined: 01 Mar 2012
Total Posts: 204
06 Jan 2016 09:50 PM
bump


sweg
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image