werts150
|
  |
| Joined: 11 Nov 2012 |
| Total Posts: 1450 |
|
|
| 02 Jan 2013 07:13 PM |
Since I can't rotate GUIs, I guess I'll have to do this the hard way: I have a frog image GUI, and I want it to move randomly in 4 directions. (left, right, up, down) I also want it to change images in the direction it's facing. Is there a wiki page I could go to? I tried searching for one, but I couldn't find anything. There were literally only 2 results on google. How do I start? |
|
|
| Report Abuse |
|
|
jknite
|
  |
| Joined: 30 Nov 2007 |
| Total Posts: 614 |
|
|
| 02 Jan 2013 07:22 PM |
UDim2.new(x,x,y,y) is for the position to give it the set position.
Here is the wiki for Tweening the Position. I am unaware of any other methods posted on the wiki. http://wiki.roblox.com/index.php/TweenPosition_(Method) |
|
|
| Report Abuse |
|
|
werts150
|
  |
| Joined: 11 Nov 2012 |
| Total Posts: 1450 |
|
|
| 02 Jan 2013 07:51 PM |
So I looked at the wiki, and I've been trying everything but this script won't work.
script.Parent:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 3, true) wait(1.5) script.Parent:TweenPosition(UDim2.new(0.5, 0, 1, 0), "Out", "Quad", 3, false)
I put it inside the GUI I want to move, and nothing happens. What do I need to change? |
|
|
| Report Abuse |
|
|
werts150
|
  |
| Joined: 11 Nov 2012 |
| Total Posts: 1450 |
|
|
| 02 Jan 2013 09:33 PM |
Nevermind, I got it to work. So how would I change this script: script.Parent:TweenPosition(UDim2.new(0.5, 0, 0.3, 0), "Out", "Quad", 4, false, nil) to make it random? Would I use math.random? If I do, how? |
|
|
| Report Abuse |
|
|
|
| 02 Jan 2013 09:36 PM |
| script.Parent:TweenPosition(UDim2.new(0, math.random(0,400), 0, math.random(0,400)), "Out", "Quad", 4, false, nil) |
|
|
| Report Abuse |
|
|
werts150
|
  |
| Joined: 11 Nov 2012 |
| Total Posts: 1450 |
|
|
| 02 Jan 2013 09:44 PM |
Wow, thanks! Now just one last thing. I added a loop so he keeps moving over and over in random directions, but now I need him to change directions. Since it's not really in 4 directions anymore, is there any way to do it without making 100 different decals of the same frog, just rotated? If I can't make rotated decals, and I can't make tons of decals, how else can I do it? Is there a way? |
|
|
| Report Abuse |
|
|
werts150
|
  |
| Joined: 11 Nov 2012 |
| Total Posts: 1450 |
|
|
| 02 Jan 2013 10:36 PM |
Oh, I forgot... Here is my script so far:
while true do script.Parent:TweenPosition(UDim2.new(0, math.random(0,400), 0, math.random(0,400)), "Out", "Quad", 3, false, nil) wait(4) script.Parent:TweenPosition(UDim2.new(0, math.random(0,400), 0, math.random(0,400)), "Out", "Quad", 3, false, nil) end |
|
|
| Report Abuse |
|
|
kolby324
|
  |
| Joined: 02 Jan 2009 |
| Total Posts: 62 |
|
|
| 02 Jan 2013 11:55 PM |
| you take bread, preheat the oven at 350 degrees, then bake the gui for a good 50 minutes. (don't forget to add the yeast) |
|
|
| Report Abuse |
|
|
werts150
|
  |
| Joined: 11 Nov 2012 |
| Total Posts: 1450 |
|
|
| 03 Jan 2013 01:45 PM |
| This is scripting helpers not bread bakers. Either you help or you leave. |
|
|
| Report Abuse |
|
|