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
 

Re: Collision detection with Vector3 issue

Previous Thread :: Next Thread 
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 04:49 PM
So basically I want to force a part into a position without collision detection, so I'm trying to use CFrame

however, this isn't working for me, I keep getting errors or collision detection no matter what I do, even if I cast every Vector3 as a CFrame

Torso.CFrame = CFrame.new(arena:FindFirstChild("Tele2").Position - Vector3.new(0,(enemy.Torso.Position.Y/2),0))

Thanks


-iJava
Report Abuse
radioactivated is not online. radioactivated
Joined: 05 Sep 2009
Total Posts: 1181
11 Aug 2016 04:50 PM
Maybe try

Torso.CFrame = arena:FindFirstChild("Tele2").CFrame - CFrame.new(the vector3 you typed in)

?
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 04:52 PM
That gave me this

bad argument #2 to '?' (Vector3 expected, got CFrame)


-iJava
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 05:07 PM
ripp


-iJava
Report Abuse
0xDEADC0DE is not online. 0xDEADC0DE
Joined: 10 Apr 2016
Total Posts: 1039
11 Aug 2016 05:14 PM
why do you do cframe.new(part).Position??? just do part.Position lol.......


Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 05:17 PM
where do you see that


-iJava
Report Abuse
0xDEADC0DE is not online. 0xDEADC0DE
Joined: 10 Apr 2016
Total Posts: 1039
11 Aug 2016 05:20 PM
Reported.


Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 05:38 PM
rip


-iJava
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 05:43 PM
aaaaa


-iJava
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
11 Aug 2016 05:52 PM
The code you posted works fine.

This works fine:
Torso.CFrame = CFrame.new(
arena.Tele2.Position - Vector3.new(0,enemy.Torso.Position.Y/2,0)
)

Although why would you want to teleport a character inside something?
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 06:12 PM
@Flux
It's still using Vector3 collision detection, though
It's forcing the part on top rather than inside of the other part


-iJava
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
11 Aug 2016 06:14 PM
It might be roblox moving the character up or something, but it's not doing what you think it's doing
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 06:14 PM
It's an NPC


-iJava
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 06:15 PM
Maybe it's just my logic that's off

Tele2 is a tiny block, .1x.1x.1
What I want to do is move the Torso so that the bottom of the Torso is at the top of Tele2

what should my code look like for that?


-iJava
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 06:23 PM
1


-iJava
Report Abuse
FrozenSmite is not online. FrozenSmite
Joined: 17 Jul 2013
Total Posts: 2242
11 Aug 2016 06:26 PM
Torso.CFrame = CFrame.new(
arena.Tele2.Position + Vector3.new(0,enemy.Torso.Size.Y/2,0)
)
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
11 Aug 2016 06:28 PM
That would place it above tho.
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 06:35 PM
Yeah that puts it way high up


-iJava
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
11 Aug 2016 06:51 PM
Torso.CFrame = CFrame.new(arena.Tele2.CFrame + Vector3.new(0,enemy.Torso.Size.Y/2,0))


Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 06:53 PM
wouldn't that just put the block a lot higher than Tele2 though?


-iJava
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 07:20 PM
yep just tested & it does


-iJava
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 07:49 PM
rippppppppppppppppp


-iJava
Report Abuse
Widths is not online. Widths
Joined: 12 Aug 2014
Total Posts: 41286
11 Aug 2016 08:07 PM
.


-iJava
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
11 Aug 2016 08:10 PM
Set parent to nil, set position, reparrent
Report Abuse
S_Fer is not online. S_Fer
Joined: 18 Jul 2016
Total Posts: 792
11 Aug 2016 08:17 PM
[ Content Deleted ]
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