|
| 26 Aug 2012 01:45 PM |
I didn't exactly fix the bug, but I made a new one! Yay me! I do it all the time! I put this code in a LocalScript for my jetpack:
--Made by Dozer86421 local Tool = script.Parent local EngineActive = false
Tool.Equipped:connect(function(mouse) local User = Tool.Parent mouse.Button1Down:connect(function() EngineActive = true BG = Instance.new("BodyGyro", User.Torso) BV = Instance.new("BodyVelocity", User.Torso) BV.velocity = Vector3.new(0,0,0) while EngineActive and wait() do BG.cframe = CFrame.new(User.Torso.Position,mouse.Hit.p) BV.velocity = BG.cframe.lookVector * 500 mouse.Button1Up:connect(function() EngineActive = false BV.velocity = Vector3.new(0,0,0) end end) end) end)
Tool.Unequipped:connect(function() EngineActive = false BG:Destroy() BV:Destroy() end)
It's in a Tool, and when I added this code:
mouse.Button1Up:connect(function() EngineActive = false BV.velocity = Vector3.new(0,0,0)
I also added an end), to close up that code. Can anyone figure out what the heck happened? I addd just a little bit of code, and the next thing I know, it breaks! If you need more information to figure this out, just tell me. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 26 Aug 2012 01:52 PM |
WAIT- I got some Output!
13:50:52 - Players.Dozer86421.Backpack.JetPack.FlyScript:19: ')' expected (to close '(' at line 15) near 'end'
Heh what the heck the heck is it talking about? |
|
|
| Report Abuse |
|
|
| |
|
Stealthah
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 288 |
|
|
| 26 Aug 2012 02:03 PM |
| Yeah, you forgot a ) a the first bit |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2012 02:08 PM |
--Made by Dozer86421 local Tool = script.Parent local EngineActive = false
Tool.Equipped:connect(function(mouse) local User = Tool.Parent mouse.Button1Down:connect(function() EngineActive = true BG = Instance.new("BodyGyro", User.Torso) BV = Instance.new("BodyVelocity", User.Torso) BV.velocity = Vector3.new(0,0,0) while EngineActive and wait() do BG.cframe = CFrame.new(User.Torso.Position,mouse.Hit.p) BV.velocity = BG.cframe.lookVector * 500 mouse.Button1Up:connect(function() EngineActive = false BV.velocity = Vector3.new(0,0,0) end) end) end) end)
Tool.Unequipped:connect(function() EngineActive = false BG:Destroy() BV:Destroy() |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2012 02:08 PM |
--Made by Dozer86421 local Tool = script.Parent local EngineActive = false
Tool.Equipped:connect(function(mouse) local User = Tool.Parent mouse.Button1Down:connect(function() EngineActive = true BG = Instance.new("BodyGyro", User.Torso) BV = Instance.new("BodyVelocity", User.Torso) BV.velocity = Vector3.new(0,0,0) while EngineActive and wait() do BG.cframe = CFrame.new(User.Torso.Position,mouse.Hit.p) BV.velocity = BG.cframe.lookVector * 500 mouse.Button1Up:connect(function() EngineActive = false BV.velocity = Vector3.new(0,0,0) end) end) end) end)
Tool.Unequipped:connect(function() EngineActive = false BG:Destroy() BV:Destroy() |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2012 02:09 PM |
--Made by Dozer86421 local Tool = script.Parent local EngineActive = false
Tool.Equipped:connect(function(mouse) local User = Tool.Parent mouse.Button1Down:connect(function() EngineActive = true BG = Instance.new("BodyGyro", User.Torso) BV = Instance.new("BodyVelocity", User.Torso) BV.velocity = Vector3.new(0,0,0) while EngineActive and wait() do BG.cframe = CFrame.new(User.Torso.Position,mouse.Hit.p) BV.velocity = BG.cframe.lookVector * 500 mouse.Button1Up:connect(function() EngineActive = false BV.velocity = Vector3.new(0,0,0) end end)) end) end)
Tool.Unequipped:connect(function() EngineActive = false BG:Destroy() BV:Destroy() |
|
|
| Report Abuse |
|
|