Mintacle
|
  |
| Joined: 28 Aug 2013 |
| Total Posts: 498 |
|
|
| 15 Nov 2015 03:25 PM |
Simply how do I use an if statement when using a gui's postion. I've done something like this which is incorrect:
if gui.Position == UDim2(0.3,0,0.3,0)
end
could someone help with this hopefully simple fix? |
|
|
| Report Abuse |
|
|
PapiPaps
|
  |
| Joined: 26 Jun 2015 |
| Total Posts: 19 |
|
|
| 15 Nov 2015 03:29 PM |
if gui.Position == UDim2(0.3,0,0.3,0) then
end |
|
|
| Report Abuse |
|
|
RonDanino
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 290 |
|
|
| 15 Nov 2015 03:30 PM |
if gui.Position == UDim2(0.3,0,0.3,0) then -- scriptscriptscript end |
|
|
| Report Abuse |
|
|
Zaxerion
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 2304 |
|
|
| 15 Nov 2015 03:32 PM |
| Lmao, nobody knows of UDim2.new() here, do they. |
|
|
| Report Abuse |
|
|
XIPokezIX
|
  |
| Joined: 24 Sep 2015 |
| Total Posts: 381 |
|
| |
|
RonDanino
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 290 |
|
|
| 15 Nov 2015 03:34 PM |
@Zaxerion
He's not trying to create a new UDim2. He's trying to do something when the UDim is in that certian position. |
|
|
| Report Abuse |
|
|
|
| 15 Nov 2015 03:40 PM |
If the GUI is like this or example:
for a=1, 10 do --Or while true do gui.Postion = UDim2.new(1,1,1,1) --Completely random end
Then in another script you have this:
if gui.Position == UDim2(0.3,0,0.3,0) then
end
You might need this:
while true do wait(1) --Any value if gui.Position == UDim2.(0.3,0,0.3,0) then end
Or you might need this (this one probably isn't correct):
while true do wait(1) --Any value if gui.UDim2 == (0.3,0,0.3,0) then end end
Sorry if none of these work :/
|
|
|
| Report Abuse |
|
|
Mintacle
|
  |
| Joined: 28 Aug 2013 |
| Total Posts: 498 |
|
|
| 27 Nov 2015 03:55 PM |
| I greatly appreciate all of the help you guys have offered! |
|
|
| Report Abuse |
|
|