|
| 31 Jul 2016 01:02 AM |
| how would you make it so where the part cancollide through another part but you can't collide through it in scripting? |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
Aethex
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 2193 |
|
|
| 31 Jul 2016 01:09 AM |
This question is somewhat hard to understand; it sounds like, basically, you want to know how to make parts move through each other, but not let the players move through those parts?
Steps:
1. Make the parts CanCollide = false (note that they'll fall through the ground unless welded or anchored) 2. Set your game to Workspace.FilteringEnabled = true 3. Use a LocalScript in StarterPlayerScripts that changes the CanCollide property of the objects to true
Please do explain better if this is not what you wanted. |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2016 01:12 AM |
fine let me explain this in terms of matter of which is on almost every scripter's level or every human's level
Let's say i were to spawn a part and spawn another part next to it so we're gonna call the first part 1 and the second part 2 now heres what i need to know how to do. lets say in scripting i want part 1 to go through part 2. and while they are both cancollide = false i need to make it where they're cancollide true so basically what im saying is i need one part to go through another and the part that's going through the other is cancollide = true so its cancollide false for going through one part but its cancollide false for when i step on it.
is a good enough desc? |
|
|
| Report Abuse |
|
|
Aethex
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 2193 |
|
|
| 31 Jul 2016 01:13 AM |
| That was another terrible explanation, but I'm almost positive my solution is what you're looking for. |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2016 01:15 AM |
| do you want me to just show you in studio what i want? |
|
|
| Report Abuse |
|
|
Aethex
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 2193 |
|
|
| 31 Jul 2016 01:20 AM |
Simplified version of what you said using direct quotes:
"i want part 1 to go through part 2" "while they are both cancollide = false i need to make it where they're cancollide true" "i need one part to go through another" "the part that's going through the other is cancollide = true so its cancollide false for going through one part but its cancollide false for when i step on it"
I gave up in the middle of that, actually. What you said makes absolute zero sense. Please do your best to read this impression of you in the voice of a pot addict: "yeah, man, it's like cancollide true, but it's like cancollide false, man, you know what i mean right bro" |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2016 01:21 AM |
let's try this again with a more descriptive.... ehh i don't care anyway
i have part 1 and part two next to each other in scripting i can't make the parts collide into each other without turning cancollide off... is it possible to have two parts or at least a part and a union collide through each other without cancollide off in scripting? |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2016 01:23 AM |
| every time i try it part 1 goes on top of part two i tried Cframe vector3 pretty much to my knowledge's extent. |
|
|
| Report Abuse |
|
|
Aethex
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 2193 |
|
|
| 31 Jul 2016 01:23 AM |
what, was that really your question
The answer is yes. Just CFrame the part into the other part.
http://wiki.roblox.com/index.php?title=CFrame |
|
|
| Report Abuse |
|
|
Aethex
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 2193 |
|
|
| 31 Jul 2016 01:24 AM |
"every time i try it part 1 goes on top of part two i tried Cframe vector3 pretty much to my knowledge's extent."
what, CFrame lets you move the parts through each other, Vector3 is what makes the parts move on top of each other |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2016 01:28 AM |
| i know this but my problem is every time i use Cframe it never comes out smoothly it comes out in 1/5 studs and not like a closing elevator door. |
|
|
| Report Abuse |
|
|
Aethex
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 2193 |
|
|
| 31 Jul 2016 01:29 AM |
http://wiki.roblox.com/index.php?title=Lerp http://wiki.roblox.com/index.php?title=CFrame#Methods |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2016 01:30 AM |
| i tried reducing the amount but every time i do it gets glitchy |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2016 01:30 AM |
| dammit i knew this was gonna come up i don't like using lerp it makes me cringe |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2016 01:32 AM |
| screw it ill just to a repeat loop using part.position = part.Position + Cframe.new(0, 0.01, 0) |
|
|
| Report Abuse |
|
|
Aethex
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 2193 |
|
|
| 31 Jul 2016 01:33 AM |
| Lerp is the most effective way of doing this. You can make it linear, if necessary, using some basic math that I'm sure you could figure out very easily. |
|
|
| Report Abuse |
|
|
Aethex
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 2193 |
|
|
| 31 Jul 2016 01:33 AM |
why would you do it like that, if you want it to move through the parts, you need to set the CFrame property of the part--not the position property
i.e.
part.CFrame = part.CFrame * CFrame.new(0, 0.1, 0); |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2016 01:37 AM |
| because i like making it more complicated |
|
|
| Report Abuse |
|
|