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: Getting around/turning off character collision?

Previous Thread :: Next Thread 
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
24 Dec 2013 02:26 PM
I have an issue-- i'm making a little obstacle course racing game. The problem is that character collisions make it easy for people to get stuck behind others. Ordinarily, you might turn off collision between ROBLOX characters' parts, but I believe this doesn't work since the ROBLOX engine does some hacky interpolation stuff or something.

So my question is, what are some ways to get around this? I had an idea of making the players' character non-replicating by putting them in the Camera, but that doesn't seem to work all that great since scripts don't run inside of there.
Report Abuse
xSIXx is not online. xSIXx
Joined: 06 Aug 2010
Total Posts: 9202
24 Dec 2013 02:29 PM
localise the obby
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
24 Dec 2013 02:30 PM
I did just that, but it doesn't do anything about character collisions.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
24 Dec 2013 02:31 PM
Making trackmania, are we?
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
24 Dec 2013 02:31 PM
You should put the character into the camera after they spawn, and weld global parts to each local part with CanCollide=false on the global parts..
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
24 Dec 2013 02:34 PM
Nope, I'm recreating a map from starcraft: http://www.youtube.com/watch?v=tCWHjUZ6JrE
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
24 Dec 2013 02:35 PM
@Monkey: Yeah, but the character breaks after it dies. It just freezes and gets stuck.
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
24 Dec 2013 02:36 PM
Unfortunately, anything with a humanoid will collide with objects, despite of their CanCollide properties, and even if you could they would just fall off the floor.

Bit of a long-shot, but you could try the following:
1) Make controllable dummies that the players move, that will race instead of the player itself. You could make them look like the player themselves if you wish.
2) Create a script that records everyone's dummies into every player's local camera, and set their CanCollide property to false.

Hard to explain, but the idea is to make everyone invisible to everyone else (Local Parts) and then recording what they do into the Cameras of the player. If you can do this then all the dummies will be able to walk inside the recordings of all the other dummies.

..anyone got any better ideas? This one probably isn't going to be made any time soon.
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
24 Dec 2013 02:37 PM
Meh, I guess I can just re-load the character after it dies. That'll make respawning quicker anyway.
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
24 Dec 2013 02:37 PM
Player:LoadCharacter() to manually respawn a player.
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
24 Dec 2013 02:41 PM
Yeh
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
24 Dec 2013 02:42 PM
@Decompiler

Eh, that's quite a bit of work. I think i'll stick with welding global parts to the local characters.
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
24 Dec 2013 02:44 PM
@suremark
The problem with that is that the characters are still technically there, and therefore still collidable. Adding the Local Parts just adds parts to a character that is located in the same place as the local parts themselves.
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
24 Dec 2013 02:47 PM
The characters are still there, but they don't replicate to other clients, as I understand it. So I would assume that therefore collisions with characters wouldn't be replicated, right? The global parts would be non-collidable and distinct from the character.
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
24 Dec 2013 03:00 PM
Actually, I am not sure.

If you can actually put a player's character into their camera, then welding uncollidable parts to the character would work. You can weld parts in the camera with parts in the workspace as far as I can tell.

Try putting the player's character in their camera on a running server simulation and see what happens.
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
24 Dec 2013 04:29 PM
Well, it turns out welds don't work. I'm guessing it's because welds don't work with local parts.
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
24 Dec 2013 04:35 PM
This is strange. I made the welds, but the new character just fall straight through the ground.

Furthermore, Humanoid.Died doesn't trigger when the player is inside the camera. ugh.
Report Abuse
RGeeneus is not online. RGeeneus
Joined: 22 Aug 2015
Total Posts: 18
27 Feb 2017 08:50 PM
I know I am reviving an old thread, but I found a really simple solution to this:

character:WaitForChild("Humanoid")
for i, characterPart in ipairs(character:children()) do
if characterPart:IsA("BasePart") then
characterPart.Name = "Fake" .. characterPart.Name
end
end
for i, characterPart in ipairs(character:children()) do
if characterPart:IsA("BasePart") then
characterPart.Name = string.gsub(characterPart.Name, "Fake", "")
characterPart.CanCollide = false
end
end

This changes the names of the parts, so that they are no longer recognized by the humanoid, then it changes the names back and turns CanCollide off at the same time. This bypasses the thing that prevents you from turning off collisions normally in a humanoid.

Just note that this is kind of an exploit, so it may not work forever. It is working as of March 2017, and it has been working for a while before.

Anyways, hope I helped, and I just wanted to post this because I could not find another simple and easy solution on the forums (because I don't think one exists).


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