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 » Scripting Helpers
Home Search
 

Re: GUI help

Previous Thread :: Next Thread 
ZizZazZuz is not online. 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
joshboy7797 is not online. joshboy7797
Joined: 06 Sep 2008
Total Posts: 1794
19 Aug 2011 03:41 PM
Game.Players.LocalPlayer

maybe that works?
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
19 Aug 2011 03:43 PM
o.e
Report Abuse
wafles26122 is not online. wafles26122
Joined: 14 Jun 2010
Total Posts: 958
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 is not online. 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
chikenugget is not online. chikenugget
Joined: 09 May 2009
Total Posts: 2552
19 Aug 2011 04:28 PM
its game.Players.LocalPlayer, if its in a localscript.

~~ In Soviet Russia, scripts write you. ~~
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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