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.
