ZizZazZuz
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 2743 |
|
|
| 19 Aug 2011 03:40 PM |
Output:
Fri Aug 19 15:39:05 2011 - LocalPlayer is not a valid member of DataModel Fri Aug 19 15:39:05 2011 - Script "Players.Player.PlayerGui.ScreenGui.Frame.JumpJetButton.Loca", Line 1 Fri Aug 19 15:39:05 2011 - stack end
Script:
plyr = game.LocalPlayer
function click() plyr.Character.Chest.Exhaust1.Transparency = 0.7 plyr.Character.Chest.Exhaust2.Transparency = 0.7 mass = 0 arm1 = plyr.Character.Arm1:getChildren() arm2 = plyr.Character.Arm2:getChildren() leg1 = plyr.Character.Leg1:getChildren() leg2 = plyr.Character.Leg2:getChildren() chest = plyr.Character.Chest:getChildren() main = plyr.Character:getChildren() script.Parent.Text = "Wait..." all = #arm1 + #arm2 + #leg1 + #leg2 + #chest + #main for i = 1, #all do if all[i]:isA("BasePart") then mass = mass + all[i]:getMass() end end plyr.Character.Chest.Middle.Jump.velocity = Vector3.new(0, mass * 250, 0) wait(5) plyr.Character.Chest.Middle.Jump.velocity = Vector3.new(0, 0, 0) plyr.Character.Chest.Exhaust1.Transparency = 1 plyr.Character.Chest.Exhaust2.Transparency = 1 mass = 0 wait(10) script.Parent.Text = "Jump Jet" end
script.Parent.MouseButton1Down:connect(click) |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2011 03:41 PM |
Game.Players.LocalPlayer
maybe that works? |
|
|
| Report Abuse |
|
|
ZizZazZuz
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 2743 |
|
| |
|
|
| 19 Aug 2011 04:17 PM |
| yeah it probably needs Players.LocalPlayer not game.LocalPlayer. when i make gui's i usually just put like player = script.Parent.Parent.Parent....how ever many Parents you need. xD |
|
|
| Report Abuse |
|
|
ZizZazZuz
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 2743 |
|
|
| 19 Aug 2011 04:17 PM |
| That's messy, and for my ADD brain it's almost impossable. Look how I messed up on this. :/ |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2011 04:28 PM |
its game.Players.LocalPlayer, if its in a localscript.
~~ In Soviet Russia, scripts write you. ~~ |
|
|
| Report Abuse |
|
|