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
 

Re: Help if you can

Previous Thread :: Next Thread 
pevdan is not online. pevdan
Joined: 04 Dec 2010
Total Posts: 26
09 Jun 2013 02:11 AM
I know this doesn't work and i know why, but I don't know how to make it work... So if anyone could help me make it work it would be much appreciated. :-)


local thing = -(point.X/target.Position.X/10)
target.CFrame = target.CFrame * CFrame.Angles(thing,0,0)
if target.CFrame.x > CFrame.fromEulerAnglesXYZ(36,y,z) then
thing = -(point.X/target.Position.X/10)
else
if target.CFrame.x < CFrame.fromEulerAnglesXYZ(-36,y,z) then
thing = (point.X/target.Position.X/10)
end
end

need help with this bit if target.CFrame.x > CFrame.fromEulerAnglesXYZ(36,y,z) then
i am trying to make it detect if the CFrame angle x is bigger than 36
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
09 Jun 2013 02:14 AM
print("We need output")
Report Abuse
pevdan is not online. pevdan
Joined: 04 Dec 2010
Total Posts: 26
09 Jun 2013 02:16 AM
And how would that work exactly?.. All that would do is print "We need output" ... I am not an idiot.
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
09 Jun 2013 02:18 AM
... I am asking you for the output.
Report Abuse
pevdan is not online. pevdan
Joined: 04 Dec 2010
Total Posts: 26
09 Jun 2013 02:26 AM
Ah... Here's a full explanation:

when you click a certain brick(target), target.CFrame = target.CFrame * CFrame.Angles(thing,0,0) makes the bricks move forward or backward depending on what "thing" is. thing = -(point.X/target.Position.X/10) makes the brick go backwards when you holy click on it and thing = (point.X/target.Position.X/10) makes it go forwards when you hold click on it. I need if target.CFrame.x > CFrame.fromEulerAnglesXYZ(36,y,z) then to detech if the CFrame angle x is bigger than 36 so it can change the value of thing to turn the other way. For example. if thing = -(point.X/target.Position.X/10) then it would chang thing to. thing = (point.X/target.Position.X/10)

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