generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

[ Content Deleted ]

Previous Thread :: Next Thread 
sharpTH is not online. 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
DrAgonmoray is not online. DrAgonmoray
Joined: 29 Jul 2008
Total Posts: 17428
08 Jul 2011 04:10 PM
BodyGyro?
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
08 Jul 2011 04:11 PM
[ Content Deleted ]
Report Abuse
sharpTH is not online. 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 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
08 Jul 2011 04:14 PM
[ Content Deleted ]
Report Abuse
DrAgonmoray is not online. DrAgonmoray
Joined: 29 Jul 2008
Total Posts: 17428
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 is not online. 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
DrAgonmoray is not online. DrAgonmoray
Joined: 29 Jul 2008
Total Posts: 17428
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image