Leeav
|
  |
 |
| Joined: 07 Sep 2006 |
| Total Posts: 1905 |
|
|
| 16 Nov 2011 09:24 PM |
Alright, so this is designed to give an equal opposite reaction when one GUI hits another. After the GUI collision, it is suppose to find the angle and react opposite of what it was hit. So far, it finds the angle, but it always restarts back up in the top right corner of the screen..
blueOrigPos=blue.Position puckOrigPos=puck.Position puckOrigSize=puck.Size A = math.atan(blueOrigPos.X.Offset) B = math.atan(puckOrigPos.X.Offset) ang = math.atan(A/B) for i=1, 100 do if B < 0 then ang = math.deg(ang)+90 else ang = math.deg(ang)+270 end puck.Position = UDim2.new(0,puck.Position.X.Offset+(-ang/blueOrigPos.X.Offset),0,puck.Position.Y.Offset+(-ang/blueOrigPos.Y.Offset)) wait() end |
|
|
| Report Abuse |
|
|
Leeav
|
  |
 |
| Joined: 07 Sep 2006 |
| Total Posts: 1905 |
|
|
| 16 Nov 2011 09:26 PM |
| Sorry, *top left corner of the screen* |
|
|
| Report Abuse |
|
|
Leeav
|
  |
 |
| Joined: 07 Sep 2006 |
| Total Posts: 1905 |
|
| |
|
|
| 17 Nov 2011 06:41 AM |
hmm.... maybe I am too bad to answer but .. how do they collide .. I mean where the script suppouse to be and how the gui should move and collide ? is there another script that moves them ? |
|
|
| Report Abuse |
|
|
Leeav
|
  |
 |
| Joined: 07 Sep 2006 |
| Total Posts: 1905 |
|
|
| 17 Nov 2011 02:41 PM |
| Yes yes, all of that is already done. This is just a small part of the entire script, and really the only part that matters with what im trying to do. |
|
|
| Report Abuse |
|
|
Leeav
|
  |
 |
| Joined: 07 Sep 2006 |
| Total Posts: 1905 |
|
| |
|
Leeav
|
  |
 |
| Joined: 07 Sep 2006 |
| Total Posts: 1905 |
|
| |
|
Leeav
|
  |
 |
| Joined: 07 Sep 2006 |
| Total Posts: 1905 |
|
| |
|
|
| 18 Nov 2011 07:37 AM |
| Please don't constantly bump threads by posting messages that aren't useful. At least, put something that might help us in the message. Anything that might somehow be helpful. But don't just post a message like "Bump" or "Is there anyone?", since it's useless and in fact considered as spam. |
|
|
| Report Abuse |
|
|
Leeav
|
  |
 |
| Joined: 07 Sep 2006 |
| Total Posts: 1905 |
|
|
| 18 Nov 2011 07:46 AM |
Alright
1) I gave you all the information you needed in the post, just certain people that can help are on at certain times of the day 2) You posted here, with no meaning, so it is considered "spam." 3) Please don't try to be a minimod, considering I used to work as a forum Moderator.. |
|
|
| Report Abuse |
|
|