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 » Game Design
Home Search
 

Re: How to keep part's position while tweening?

Previous Thread :: Next Thread 
Eppobot is not online. Eppobot
Joined: 08 May 2012
Total Posts: 210
17 Jun 2017 03:04 PM
So I have a part that I want to tween (CanCollide = true), let's call it PartA

The problem is that whenever I tween PartA, and it touches another part (Also CanCollide = true), PartA's position changes. Is there any way I can avoid that?
Report Abuse
itz_koko is not online. itz_koko
Joined: 05 Apr 2017
Total Posts: 15
17 Jun 2017 03:09 PM
go ### lolololololololololololololoo jk go ### plz lolololololololo
Report Abuse
SkeletalReality is not online. SkeletalReality
Joined: 25 Mar 2011
Total Posts: 19852
17 Jun 2017 03:11 PM
It sounds like you are tweening the part with Vector3, so I highly recommend you use CFrame instead. This avoid parts from colliding with others.

CFrame = CFrame.new(x,y,z)

(Optional) If you are rotating the basepart as well, you need to use CFrame.Angles. This instance measures in radians, so you need to use math.rad(). This will convert it to degrees.

CFrame = CFrame.new(x,y,z)*CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))


Report Abuse
Eppobot is not online. Eppobot
Joined: 08 May 2012
Total Posts: 210
17 Jun 2017 03:29 PM
I forgot to tell that I am tweening size. I tried using CFrame but without success. Of course, there is a possibility that I did something incorrectly. Any ideas?
Report Abuse
Vangief is not online. Vangief
Joined: 28 May 2017
Total Posts: 66
17 Jun 2017 03:36 PM
you really cant resize a part with CFrame since its position. You use a Vector3, since size is a Vector3 value.
Report Abuse
Eppobot is not online. Eppobot
Joined: 08 May 2012
Total Posts: 210
17 Jun 2017 03:56 PM
Unfortunately, Vector3.new is not working. If you have any, even complicated ideas, let me know!
Report Abuse
SkeletalReality is not online. SkeletalReality
Joined: 25 Mar 2011
Total Posts: 19852
17 Jun 2017 04:01 PM
Size will not change its position when it interferes with another part, as long as you're using CFrame to change its position.

Can I get a look at the script you made? I think I might be able to fix it.


Report Abuse
Eppobot is not online. Eppobot
Joined: 08 May 2012
Total Posts: 210
17 Jun 2017 04:24 PM
PM sent
Report Abuse
Scottifly is online. Scottifly
Joined: 30 Jan 2011
Total Posts: 9180
17 Jun 2017 04:44 PM
Anchor the Part.
Report Abuse
Eppobot is not online. Eppobot
Joined: 08 May 2012
Total Posts: 210
17 Jun 2017 04:47 PM
It is anchored.
Report Abuse
Scottifly is online. Scottifly
Joined: 30 Jan 2011
Total Posts: 9180
17 Jun 2017 04:54 PM
Are you trying to resize it on only one direction?
If you resize it from 3 studs long to 4 studs but you only want one end to get longer then you have to CFrame the center position of the Part.
Report Abuse
Eppobot is not online. Eppobot
Joined: 08 May 2012
Total Posts: 210
17 Jun 2017 05:00 PM
Basically, the position is the same, until the part becomes large enough to hit other parts. When it touches other parts, part moves up = position gets changed.
Report Abuse
Eppobot is not online. Eppobot
Joined: 08 May 2012
Total Posts: 210
17 Jun 2017 06:40 PM
Ideas?
Report Abuse
Scottifly is online. Scottifly
Joined: 30 Jan 2011
Total Posts: 9180
18 Jun 2017 06:51 PM
Hmm, I'm not sure.
What if you CFrame it to the same spot every time it changes size so it stays there?

If the physical size of the Part isn't a big deal, just make it a Mesh and change the Scale of the Mesh with the script.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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