sharpTH
|
  |
| Joined: 29 Apr 2007 |
| Total Posts: 9692 |
|
|
| 08 Jul 2011 04:09 PM |
At the moment, i've made a bunch of "Creatures" that kill a player once it hits them, problem is, since they use a bodypositiont to move around, when you walk towards them and die, they'll probably spin around, and since it's a 2D game, i want them to face one direction and one direction only. Any solutions? |
|
|
| Report Abuse |
|
|
| |
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
sharpTH
|
  |
| Joined: 29 Apr 2007 |
| Total Posts: 9692 |
|
|
| 08 Jul 2011 04:11 PM |
| I tinkered with bodygyro with no success. [Ever since i've joined ROBLOX, i'm horrible at stuff like these, i admit], does anyone have a good setting for horizontal stabilization? |
|
|
| Report Abuse |
|
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
|
| 08 Jul 2011 04:14 PM |
BodyGyro.cframe = brick.CFrame
That will make it so the brick can't rotate, assuming your other BodyGyro properties are correct. I haven't been on Roblox in a long time, so you'll have to ask someone else, or look into the specifics yourself. |
|
|
| Report Abuse |
|
|
sharpTH
|
  |
| Joined: 29 Apr 2007 |
| Total Posts: 9692 |
|
|
| 08 Jul 2011 04:29 PM |
| Wait, so how would the complete script with that argument be? I tried it in game on it's own, and obviously it didn't work. |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2011 04:34 PM |
I can't implement it in your code, seeing as I don't have your code, and I honestly have no idea what you're trying to do. In my head, I see this as some kind of 2D sidescroller fish game where you blow up fish for teh lulz.
But basically, assuming your things are only going to face one direction, insert a BodyGyro into each of the enemies, then put something like this at the top of your script:
script.Parent.BodyGyro.cframe = script.Parent.CFrame |
|
|
| Report Abuse |
|
|
sharpTH
|
  |
| Joined: 29 Apr 2007 |
| Total Posts: 9692 |
|
|
| 08 Jul 2011 04:37 PM |
Nevermind, i was stupid, i forgot to capitalize script.Parent in my own version, thanks for the tip, though!
|
|
|
| Report Abuse |
|
|