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
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
| |
|
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
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 09 Jun 2013 02:18 AM |
| ... I am asking you for the output. |
|
|
| Report Abuse |
|
|
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 |
|
|