awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
|
| 01 Nov 2011 02:55 PM |
| Can someone tell me how to use CFrame when making a brick script. |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 01 Nov 2011 02:57 PM |
Item.CFrame = item.CFrame * CFrame.Angles(0,0,0) -- rotation Item.CFrame = CFrame.new(0,0,0) -- position |
|
|
| Report Abuse |
|
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
|
| 01 Nov 2011 03:00 PM |
ok add cframe to this script
b = Instance.new("Part") b.Parent = game.Workspace b.Position = Vector3.new(5,5,5) b.Size = Vector3.new(10,10,10) b.BrickColor = BrickColor.new("Dark green")
Add cframe position in this script somewhere. If color is broken please tell me. I only a beginner yet, |
|
|
| Report Abuse |
|
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
|
| 01 Nov 2011 03:03 PM |
How about if i do this
b.CFrame = CFrame.new(...) --Please give me a position
or
b.CFrameValue = CFrameValue.new(...) --Please give me a position, |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2011 03:12 PM |
b = Instance.new("Part") b.Parent = game.Workspace b.CFrame=CFrame.new(Vector3.new(5,10,55)) --changed this line b.Size = Vector3.new(10,10,10) b.BrickColor = BrickColor.new("Dark green") |
|
|
| Report Abuse |
|
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
| |
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
|
| 01 Nov 2011 03:38 PM |
| It doesnt change rotation??? |
|
|
| Report Abuse |
|
|
sam6175
|
  |
| Joined: 16 Aug 2008 |
| Total Posts: 1391 |
|
|
| 01 Nov 2011 03:50 PM |
| Cframe isnt always rotation, it can be position as well |
|
|
| Report Abuse |
|
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
|
| 01 Nov 2011 03:53 PM |
| I want it to change rotation... |
|
|
| Report Abuse |
|
|
br45entei
|
  |
| Joined: 06 Nov 2010 |
| Total Posts: 1058 |
|
|
| 01 Nov 2011 03:56 PM |
part = (pathname here)
while wait() do part.CFrame = CFrame.new(script.Position.Value, script.LookVector.Value) * CFrame.Angles(script.Angle.Value.X, script.Angle.Value.Y, script.Angle.Value.Z) end
For that, just have three Vector3Values inside the script, and name one "Position", and the next one "LookVector", then the last one "Angle". Then edit each until the part is to your liking. This is the simplest CoordinateFraming Tool I've come across, and it works Wonders. |
|
|
| Report Abuse |
|
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
| |
|
br45entei
|
  |
| Joined: 06 Nov 2010 |
| Total Posts: 1058 |
|
|
| 01 Nov 2011 04:35 PM |
| The only drawback with that is you have to manually enter the target part in the script. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 01 Nov 2011 04:49 PM |
| http://wiki.roblox.com/index.php/CFrame |
|
|
| Report Abuse |
|
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
| |
|
Zlavaz
|
  |
| Joined: 23 Oct 2011 |
| Total Posts: 2722 |
|
|
| 08 Nov 2011 04:03 PM |
| Please add "?" so we know it is a question. :) |
|
|
| Report Abuse |
|
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
| |
|
mark298
|
  |
| Joined: 24 Oct 2008 |
| Total Posts: 1264 |
|
|
| 11 Nov 2011 11:11 AM |
game.Selection:Get()[1].CFrame = game.Selection:Get()[1].CFrame * CFrame.new(0, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
-Centre 0's are for slideing brick in which ever way it's facing. Last 0's for rotating.
game.Selection:Get()[1].CFrame = game.Selection:Get()[1].CFrame + Vector3.new(0, 0, 0)
-Slides brick on the Normal Axis. |
|
|
| Report Abuse |
|
|