|
| 17 Nov 2012 01:15 PM |
I want this script to move the TextLabel it's in upward, and I didn't know how, so I did a guess, and it broke after this line:
script.Parent.Position.Y.Offset = script.Parent.Position.Y.Offset - 20
The output says "Offset cannot be assigned to"
What is my error and how do I move the TextLabel? Or is it not possible?
|
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:17 PM |
| TO GUI.Position = UDim2.new(0.0, 0, 0.0, 0) |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:19 PM |
I'm also trying to move it up regardless of where it is (hence the - 20 instead of an actual value)
So would that apply there? |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 17 Nov 2012 01:20 PM |
You can't set certain parts of a property, you must set the whole property. For what you're doing you could do something like,
Gui.Position = Gui.Position-UDim2.new(0,0,0,20) -- Takes away 20 y offset |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:22 PM |
| TO GUI.Position = TOGUI AGAIN.Postion + UDim2.new(0.0, 0, 0.0, -20) |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:22 PM |
| I'm not so sure I understand. |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 17 Nov 2012 01:23 PM |
| Do you know what UDim2 is? |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:25 PM |
@Yu game.Players.PLAYERSNAME.PlayerGui.GUISNAME.Position = game.Players.PLAYERSNAME.PlayerGui.GUISNAME.Position + UDim2.new(0.0, 0, 0.0, -20)
Or if its in the GUI use script.Parent not game.Players.PLAYERSNAME.PlayerGui.GUISNAME |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:25 PM |
| Nevermind, I got it to work. Thanks for your help. |
|
|
| Report Abuse |
|
|