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
 

How do I make a part move through a part?

Previous Thread :: Next Thread 
isaacsoccer is not online. isaacsoccer
Joined: 22 Jul 2010
Total Posts: 430
01 Jan 2016 01:35 AM
Okay, so I want to use a script to move a part, but every time the part I am moving hits another part, it teleports to the top of the part it hit. Here is what I was trying:

for a=1,30 do
script.Parent.CFrame = CFrame.new(script.Parent.Position) * CFrame.new(0,-1,0)
end

So that is supposed to go upwards by 1 stud 30 times. When it hits a block above where it is trying to move to, it teleports to the top of the block it hit, how do I make it so it just slides trhough the block. WITHOUT CHANGING THE CANCOLLIDE FROM TRUE TO FALSE!
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
01 Jan 2016 01:38 AM
Make sure the part is anchored.
Report Abuse
isaacsoccer is not online. isaacsoccer
Joined: 22 Jul 2010
Total Posts: 430
01 Jan 2016 01:50 AM
It is anchored
Report Abuse
isaacsoccer is not online. isaacsoccer
Joined: 22 Jul 2010
Total Posts: 430
01 Jan 2016 01:53 AM
It is working now never mind
Report Abuse
maxvat is online. maxvat
Joined: 24 Oct 2012
Total Posts: 221
01 Jan 2016 01:55 AM
And still its not working well?
Report Abuse
oni0n is not online. oni0n
Joined: 04 Nov 2012
Total Posts: 2975
01 Jan 2016 01:56 AM
Refer to the 3-dimensional plane (x, y, z):

"* CFrame.new(0, -1, 0)"
---------------^X
------------------^Y
---------------------^Z

You are in turn moving the part upward via the Y axis, moving it up 1 stud. I suggest you use either the X or Z axis, since those are for horizontal positioning, rather than vertical positioning.

Also, why did you include a for loop?





#code cout << "Proof by analogy is fraud." << endl; //Bjarne Stroustrup
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