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: CFrame

Previous Thread :: Next Thread 
makerror is not online. makerror
Joined: 29 Aug 2011
Total Posts: 493
29 Jun 2013 01:45 PM
part = game.Workspace.Pillar

x = game.Workspace.RotatePart
x.CFrame = CFrame.new(x.Position, game.Workspace.FollowPart.Position) * CFrame.Angles(240,90,0)


x.CFrame = part.CFrame + CFrame.new(0,2,2)

I need to make RotatePart CFrame like Pillar and block point where the cursor is

I have no idea how to connect those 2 lines...

Report Abuse
makerror is not online. makerror
Joined: 29 Aug 2011
Total Posts: 493
29 Jun 2013 02:01 PM
bump
Report Abuse
makerror is not online. makerror
Joined: 29 Aug 2011
Total Posts: 493
29 Jun 2013 02:24 PM
Is this even possible?
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
29 Jun 2013 02:28 PM
I'm not entirely sure what you are asking here, but I believe it is possible. You want to take two points and connect them with a brick using lua, correct?

~ The ATR Fishie ~
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
29 Jun 2013 02:29 PM
If that is what you're asking it is possible. I've seen it done before, I'm just not sure how it is done.

~ The ATR Fishie ~
Report Abuse
DrWaffler is not online. DrWaffler
Joined: 16 Sep 2011
Total Posts: 4248
29 Jun 2013 02:33 PM
Raycasting puts a brick between two points.

Makes a 'lazer' looking effect.

Also I believe there is a property somewhere like Arc Angles or something, it's one of those 3D GUI things. It isn't a brick, but it gives the effect.
Report Abuse
makerror is not online. makerror
Joined: 29 Aug 2011
Total Posts: 493
29 Jun 2013 02:39 PM
x = game.Workspace.RotatePart
x.CFrame = CFrame.new(x.Position, game.Workspace.FollowPart.Position)

You know this CFrame constructor? it let me to make that rotation

And I want to keep that part near Pillar if I move Pillar somewhere else
To do this I need to use
x.CFrame = part.CFrame -- part is a Pillar


I can't just make:
x.CFrame = CFrame.new(x.Position, game.Workspace.FollowPart.Position)
x.CFrame = part.CFrame

SO, i need to connect those 2 lines into 1, I think

Probably my English grammar is bad enough, because I don't know how to explain it more understable
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
29 Jun 2013 02:44 PM
You can't add CFrames.
Report Abuse
makerror is not online. makerror
Joined: 29 Aug 2011
Total Posts: 493
29 Jun 2013 02:47 PM
what you mean?
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
29 Jun 2013 02:48 PM
local cf = CFrame.new(0, 0, 0) + CFrame.new(1, 1, 1)

That won't work.
Report Abuse
makerror is not online. makerror
Joined: 29 Aug 2011
Total Posts: 493
29 Jun 2013 03:59 PM
Oh,

x = game.Workspace.RotatePart
cursor = game.Workspace.FollowPart

x.CFrame=CFrame.new(x.Position, cursor.Position)*CFrame.Angles(240,90,0)
x.CFrame * CFrame.new(0,0,2)


Now x.CFrame * CFrame.new(0,0,2) works


Report Abuse
makerror is not online. makerror
Joined: 29 Aug 2011
Total Posts: 493
29 Jun 2013 04:18 PM
x.CFrame=CFrame.new(x.Position, cursor.Position)*CFrame.Angles(240,90,0)
x.CFrame * CFrame.new(0,0,2)

It's possible to fuze them into 1 line and make it to work?
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