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: Simple Line Not working

Previous Thread :: Next Thread 
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 02:37 PM
x.Weight.Value = (x.Size.X*px * x.Size.Y*px)

It can't preform arithmetic to X according to the output.
Report Abuse
xWOWZABOYx is not online. xWOWZABOYx
Joined: 05 Aug 2010
Total Posts: 2689
17 Dec 2013 02:41 PM
XSiz = x.Size.X
YSiz = x.Size.Y

x.Weight.Value = (YSiz * px) * (XSiz * px))

【◄[ϟ]〓☜✪ xWOWZABOYx; FCOM, SQN COM, Scientist, Veteran, Visionary ✪☞〓[ϟ]►】
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 02:47 PM
That didn't work :(
Report Abuse
xWOWZABOYx is not online. xWOWZABOYx
Joined: 05 Aug 2010
Total Posts: 2689
17 Dec 2013 02:54 PM
What error did it return?

【◄[ϟ]〓☜✪ xWOWZABOYx; FCOM, SQN COM, Scientist, Veteran, Visionary ✪☞〓[ϟ]►】
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 03:03 PM
Players.Player1.PlayerGui.2DWorld.MainFrame.Player.data:7: attempt to perform arithmetic on global 'YSiz' (a userdata value)
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 03:20 PM
bump
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 03:26 PM
bermp
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 03:59 PM
bumpity
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 04:17 PM
bamp
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 04:26 PM
Is this so difficult that no one knows how to fix it?
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 04:35 PM
Common guys this is just one simple line of code.
Report Abuse
ColdSmoke is online. ColdSmoke
Joined: 02 Jan 2012
Total Posts: 5784
17 Dec 2013 04:57 PM
show us all the code, I don't know whats wrong unless I see everything


and if that is everything then you are way off
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 05:23 PM
sp = script.Parent

function setWeight(x)
px = 0.01041667
XSiz = x.Size.X
YSiz = x.Size.Y
x.Weight.Value = x.Size*UDim2.new(0,x.Size.X,0,x.Size.Y)*px
end

setWeight(sp)
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 05:59 PM
bump
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 06:11 PM
bump
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 06:17 PM
This forum is useless
Report Abuse
ColdSmoke is online. ColdSmoke
Joined: 02 Jan 2012
Total Posts: 5784
17 Dec 2013 06:35 PM
do you even know what you are doing?
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 06:36 PM
I fixed it :P
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
17 Dec 2013 06:36 PM
Cold, stop being so patronizing.

You didn't define 'x', I don't think.
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
17 Dec 2013 06:39 PM
x is the variable for the parameters.
Report Abuse
xWOWZABOYx is not online. xWOWZABOYx
Joined: 05 Aug 2010
Total Posts: 2689
18 Dec 2013 11:50 AM
Alrighty then. Make two number values and parent them to the script. call on SizX and one SizY.

script.SizX.Value = x.Size.X
script.SizY.Value = x.Size.Y
x.Weight.Value = (script.SizY.Value*px * script.SizX.Value*px) --timesing it by px twice?


【◄[ϟ]〓☜✪ xWOWZABOYx; FCOM, SQN COM, Scientist, Veteran, Visionary ✪☞〓[ϟ]►】
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