V_lidus
(xda)
January 14, 2022, 10:24pm
#1
Hey everyone!
I’m making a detain tool that has 2 types of grabbing, a cuff behind back and a choke hold animation. Problem is, in both animations the player slows down significantly in walkspeed. I know it’s because that the player they grab onto is inhibiting their ability to go forward more, at least I think?
How would I go about fixing this? I can’t change the can-collide features on the other player, as they just default back.
1 Like
RatiusRat
(Boopmaster)
January 14, 2022, 10:40pm
#2
It’s probably due to the mass of the dummy?
IsNotJail
(Jail)
January 14, 2022, 10:46pm
#3
There is two things I would try.
Set all of the dummy’s base parts descendants to massless.
Create a collision group between the two players, and make it so they don’t collide with eachother.
Let me know if you need help doing these! But first, check out these:
The process of setting every instance’s CollisionGroup within players’ characters is very similar, in your case we need to:
Listen for players joining
Connect a function to players’ CharacterAdded event to execute for all spawns upon entrance to the server
Iterate through every descendant of newly spawned characters and ensure that those inheriting BasePart ’s properties are massless
Your code should accomplish something like this:
game:GetService'Players'.PlayerAdded:Connect(functio…
https://developer.roblox.com/en-us/articles/Collision-Filtering
2 Likes
I mean, I would leave it to how it is because I don’t think you’re going to be walking normal speed holding a guy. Sorry if its irreverent
IsNotJail
(Jail)
January 14, 2022, 10:55pm
#5
I agree with him, but you might want to be able to go a little faster or something, let it be in your control. (see my post above on how)
1 Like
V_lidus
(xda)
January 14, 2022, 10:59pm
#6
It’s not meant to be realistic.
V_lidus
(xda)
January 14, 2022, 10:59pm
#7
I’ll look into this right away!
1 Like
Some realism isn’t always bad, it was just a suggestion.
1 Like
Have you tried just setting the walkspeed faster? Instead of 16, when they player detains someone else, just make it 30.
IsNotJail
(Jail)
January 14, 2022, 11:10pm
#10
This may work, but isn’t always reliable. It can be different speeds depending on the mass of the character, the collisions it’s creating and all that.
V_lidus
(xda)
January 14, 2022, 11:39pm
#11
So turning it all massless did nothing, so I opted into collision groups. Thanks!
1 Like