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 |
|
|
|
| 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
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
|
| 17 Dec 2013 02:54 PM |
What error did it return?
【◄[ϟ]〓☜✪ xWOWZABOYx; FCOM, SQN COM, Scientist, Veteran, Visionary ✪☞〓[ϟ]►】 |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
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
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
|
| 17 Dec 2013 06:36 PM |
Cold, stop being so patronizing.
You didn't define 'x', I don't think. |
|
|
| Report Abuse |
|
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
|
| 17 Dec 2013 06:39 PM |
| x is the variable for the parameters. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|