CustomPhysicalProperties bug?

local shootprops = PhysicalProperties.new(.55, 1, 2, .3, 1)
local dribbleprops = PhysicalProperties.new(.725, 1, 1.75, .1, 1)

function module:SetPhysics(ball,Type)
	spawn(function()
		if Type == 'Shoot' then
			ball.CustomPhysicalProperties = shootprops
			ball.physics.physics.Value = 'Shoot'
			local done = false
			repeat 
				wait(.25) 
				local touchingparts = ball:GetTouchingParts()
				if #touchingparts > 1 then
					for _,v in pairs(touchingparts) do
						if v.Name == 'Grass' then
							done = true
							break
						end
					end
				end
			until ball == nil or done == true
			ball.CustomPhysicalProperties = dribbleprops
			ball.physics.physics.Value = 'Dribble'
		elseif Type == 'Dribble' then
			ball.CustomPhysicalProperties = dribbleprops
			ball.physics.physics.Value = 'Dribble'
		end
	end)
end

this is my code, everything works perfectly but for some reason
ElasticityWeight and Friction get set to 1.

1 Like

This is the order of how PhysicalProperties arguments should be passed:

In the code, you are setting the elasticityWeight to 1. Also, keep in mind that the friction and elasticity values can only be between 0 and 1.

2 Likes

ah okay, i thought it was in this order

image

1 Like