Hey everyone , I’m currently working on an MPS project (a roblox football game), and I need some help on ball collision. I’ve managed to get the ball moving smoothly under the player, as most modern MPS pitches manage, but I want to work out a “snappier” player movement above the ball.
The only games I know that have this affect are two closed ro-football leagues, ESA and PRS.
What I have:
I achieved the effect above by putting the HumanoidRootPart of the player and the ball in two independent collision groups that can’t collide with each other, which is how most MPS pitches do this.
What I’m looking for:
The reason I’m looking for this effect is because I want this pitch to be more competitive rather than the usual, and I’m also trying to keep it unique in it’s own way. It looks like the torso is the thing colliding with the ball, and I’m not sure how to modify the character to get this affect.
So far I’ve tried setting different CustomPhysicalProperties for every limb in the character, I’ve tried setting individual limbs to different CustomPhysicalProperties, I’ve tried using an identical ball from a similar pitch which has the “snappier” movement on the ball, and nothing has worked out.
It also appears that the pitch with the snappier movement looks to have a very similar collision group setup, thought I may just be ignorant because of how long I’ve been trying to figure this out
I’m a bit new to development especially in this area, so any advice would be greatly appreciated.
Im not 100%, not even 90% sure.
But it kinda looks like the game that has the effect your looking for, has another part between the legs which is colliding with the ball.
In many football games, developers tweak CustomPhysicalProperties to ensure the ball reacts sharply to player movement. Here are some settings to experiment with:
Density: 0.1 - 0.5 (Lower values make it more responsive)
So small update, I tried what’s been recommended, and a few things have happened.
Trying to change the custom physical properties of the ball and player hasn’t resulted in any changes, at least any that are visible.
Adding a part inside the player to take care of the collision for the ball definitely gave the ball a bit of a sharper feeling, but to do that, I’d have to make the part longer, like the image below:
Though it looks like a fine solution at first, it results in the ball colliding with the part which is outside of the body, which means it won’t collide with the body normally and let the player hit it with their legs.
Obviously, changing the part’s size fixes it, but it also just removes the snappy feeling in the process.
I found a game with the snappy feeling, but nothing I’ve looked at and tried myself has worked in migration.
It looks like the ball collides with the torso as well, because disabling collision on the torso also disables collision on the ball. The collision groups are setup pretty much the exact same way, with every limb in a collision group that doesn’t collide with the ball.
(Btw the CustomPhysicalProperties are the same in my pitch)
What should I try next? Maybe I just forgot something?
You can set a new CollisionGroup for the Torso.
(I usually do this by script rather than the plugin)
First register 2 CollisionGroups (on the >SERVER<) like this: PhysicsService:RegisterCollisionGroup("Ball") PhysicsService:RegisterCollisionGroup("Torso")
Then you can set collisions between the “Ball” and “Torso” CollisionGroups to false to stop them colliding with eachother using: PhysicsService:CollisionGroupSetCollidable("Ball", "Torso", false)
Make parts with “Ball” CollisionGroup collide with eachother (this (“Ball” Collision) will be used for the Hitbox too): PhysicsService:CollisionGroupSetCollidable("Ball", "Ball", true)
Also make the “Torso” CollisionGroups not collide with eachother: PhysicsService:CollisionGroupSetCollidable("Torso", "Torso", false)
This part may be unnecessary, but incase it is infact necessary also do this: PhysicsService:CollisionGroupSetCollidable("Ball", "Default", true)
Then ofc you will need to change the Ball’s CollisionGroup to “Ball”
After this is done, add a LocalScript to StarterCharacterScripts with the following script
local Character = script.Parent
local LowerTorso = Character:WaitForChild("LowerTorso",5)
local UpperTorso = Character:WaitForChild("UpperTorso",5)
local R6Torso = not LowerTorso and Character:WaitForChild("Torso",5)
if R6Torso then -- This is for R6 Characters
R6Torso.CollisionGroup = "Torso"
else -- This is for R15 Characters
LowerTorso.CollisionGroup = "Torso"
UpperTorso.CollisionGroup = "Torso"
end
Thank you all for making an effort to help me and solve the issue alongside me, you all are very talented and I appreciate your inputs.
So it turns out that I was being ignorant after all. The solution to this issue turned out being editing the CustomPhysicalProperties of the ball and the limbs in the body.
Here are the settings I used to achieve this effect in my game.
Torso:
Limbs (Right leg, Left leg, Right arm, Left arm (R6))
Head
HumanoidRootPart
Ball
Again, thanks to you guys for your answers, I wouldn’t have figured it out without you two.