How to stop player from walking over ball/sphere (soccer ball)

Im working on the physics for my soccer/football game and ive got stuff like shooting and dribbling down already, the one issue i have is the ball physics. I decided to switch from the ball and players not being able to collide to trying to want another system after playing MPS Futsal.

example of how it is by default:
https://gyazo.com/6a5f1b7b9a2318302c106a2e687a3742

example of how i want it: (mps futsal)
https://gyazo.com/21814903863d9c3d899bbc42b50d585e

things ive tried: meh tried giving net ownership to whoever is the current owner of the ball/current carrier and it kind of just broke everything else do to with velocity like shooting etc and did not give me the sort of control i want

im a decent scripter but for some reason i cant wrap my head around how i would achieve this. no need to write out script for me just explain what i have to do. thank you

2 Likes

Idk just make the ball bigger.

1 Like

ive tried this, and even with a 4,4,4 ball (2x my nromal ball) it still doesnt achieve the same effect i want. also the the 2 games ive seen with the feature i desire have normal size balls.

Is making the player’s max slope angle zero an option?
Or you could try making the ball not collidable with the player character, then making an invisible cylinder that’s welded to the player that only the ball collides with.

1 Like

I’ve not tried this before, but here’s a thought. Change the Y size of HumanoidRootPart to 6 (so that it touches the ground), and Humanoid.HipHeight to 0.

1 Like

doesnt seem to work. set hrp to like 6 and added it to collisiongroup to make it collide with ball, hipheight -2 but doesnt seem to work.

1 Like

all right this seems like a good idea lemme try it

1 Like

Nevermind, slowing the ball down after touching it didnt seem to work. I still cant achieve the effect like i showed in the gif. any1 got any ideas?

1 Like

Are you sure colliding the ball and character won’t work? It appears that you added a system for kicking the ball when the character touches the ball. A collision group between the character and the ball would make the player enter the ball, but the touch function would still function, firing the shooting function automatically.

1 Like

Well no. In the gif i posted i had collision on with the ball but normally its off, and when i touched the ball with collision on that was nothing scripted it was legit just flinging itself.

this is my shooting system i already made that uses m1 input and overlapparams.

when collision is turned on i dont get the smooth moving like i want i get the weird flinging like in the first gif.

All right! Having tested it out for myself, I was able to make it work.

Consider two collision groups, one called “Ball” and the other “Character”.

Here is a video showing how to make collision groups.

Afterward, set the ball in the group collision to “Ball” and set this script in startercharacterscripts.

--//Bloxynet
local player = game.Players.LocalPlayer
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing, false) -- We make the player not be able to climb

character.HumanoidRootPart.CollisionGroup = "Character" -- and we make the character a different collisiongroup

for i, Limbs in pairs(character:GetChildren()) do
	if Limbs:IsA("BasePart") and Limbs.Name ~= "Head" then
		Limbs.CustomPhysicalProperties = PhysicalProperties.new(0.7, 0.3, 0, 1, 100) -- we set the limbs to a different physical Property
	end
end

As a result, the ball should no longer fling and should be smooth to play with.

Add a little force every time the character hits and it should work very smoothly!

3 Likes

Can you tell me where the flinging part is? I don’t see a gif of that.

1 Like

I really appreciate all the help your giving me.
But ive already achieved this. I already have collision groups set up for the ball like you mentioned, and ive gotten to the same effect like in ur video but it still isnt the desired effect like in the gif at the start of the thread.

1 Like

the first gif at the start of the thread

1 Like


Is this something you want to achieve?

1 Like

I have achieved something similar by using constraints. Making a cylinder that can ONLY collide with the character parts and connect it with a ball/socket to the ball itself. Add a alignrotation to keep it upright. Also maybe make it massless. Just a round wall around the ball that goes a few studs up. Just got to remember to account for the collision groups with rays, touches, and such.

1 Like

If you want the ball to behave differently, try changing its physics properties. I’m sure you’ll appreciate this exact setup for your ball.

image

(You still need to have the same collision system.)

1 Like

If there is a problem with the ball going too fast, then I recommend changing the ball’s gravity. There are lots of ways to do it.

1 Like

i pretty much already have the same properties except some higher density to account for my ball being slightly smaller. thats the density that is optional for realistic ball physics.

1 Like

I already have a vectorforce at around 600 Y to account for yet again realist ball physics but it doesnt seem to help how far the ball is pushed

1 Like