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 » Scripters
Home Search
 

Calculating CFrame Difference

Previous Thread :: Next Thread 
Scripbuilder900 is not online. Scripbuilder900
Joined: 04 Aug 2011
Total Posts: 183
04 Jul 2016 05:22 PM
I'm using CFrame(I have to and can't use.Position) to add a part where I click. I can detect the base's CFrame, and obviously have the CFrame of my part. If I set the CFrame.Y value of my part to the Base CFrame.Y the part will appear inside of each other. What is the formula to calculate how many studs the CFrame'd part would have to be raised to no longer be colliding inside the base?
Report Abuse
Scripbuilder900 is not online. Scripbuilder900
Joined: 04 Aug 2011
Total Posts: 183
04 Jul 2016 05:29 PM
Bump
Report Abuse
cntkillme1 is not online. cntkillme1
Joined: 16 Feb 2012
Total Posts: 592
04 Jul 2016 05:33 PM
why not just set the position property then?
Report Abuse
Scripbuilder900 is not online. Scripbuilder900
Joined: 04 Aug 2011
Total Posts: 183
04 Jul 2016 05:33 PM
Re-Bump somebody has to know this...
Report Abuse
Scripbuilder900 is not online. Scripbuilder900
Joined: 04 Aug 2011
Total Posts: 183
04 Jul 2016 05:37 PM
I can't. I need it to be CFrame. For some reason Position is placing it in the air
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
04 Jul 2016 05:38 PM
do this with position

function SetPosition(obj,pos)
local old=obj.Parent
obj.Parent=nil
obj.Position=pos
obj.Parent=old
return obj
end

SetPosition(game.Workspace.Part,Vector3.new(1,1,1))
Report Abuse
Scripbuilder900 is not online. Scripbuilder900
Joined: 04 Aug 2011
Total Posts: 183
04 Jul 2016 05:42 PM
You realize that wouldn't solve anything right?

It would go like this.

local old = obj.Parent <--(The workspace)
obj.Parent = nil <--- The game?

Plus as I've stated I need CFrame
Report Abuse
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
04 Jul 2016 05:43 PM
use pos and make a cframe with the vector

CFrame.new(Position)
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
04 Jul 2016 05:44 PM
It would work because old is the value and not the reference.

If I did this:
local &old=obj.Parent

Then it wouldn't work because that's the reference. Although this doesn't matter because I'm pretty sure you cannot have a reference of a property directly.
Report Abuse
Scripbuilder900 is not online. Scripbuilder900
Joined: 04 Aug 2011
Total Posts: 183
04 Jul 2016 05:46 PM
@Ty, No. I need CFrame

@Narwhal,

That set the position into the brick(like CFrame would) so it still doesn't work
Report Abuse
Scripbuilder900 is not online. Scripbuilder900
Joined: 04 Aug 2011
Total Posts: 183
04 Jul 2016 05:56 PM
Bump
Report Abuse
Scripbuilder900 is not online. Scripbuilder900
Joined: 04 Aug 2011
Total Posts: 183
04 Jul 2016 06:11 PM
Bump
Report Abuse
Scripbuilder900 is not online. Scripbuilder900
Joined: 04 Aug 2011
Total Posts: 183
04 Jul 2016 06:18 PM
I will literally pay 5,000 RB for someone to solve this
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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