#SOCCER BALL PHYSICS

1 messages · Page 1 of 1 (latest)

midnight meteor
#

hello, i tried to do a soccer ball physics r6 but i failed, ball wasn’t reacting at my toolset and move and was moving herself i rly need help from a scripter.

midnight meteor
#

look the ball hitbox should be

#

like that

#

but

#

i tried to do a script ect

#

bug ball totally

#

but

#

bugged

#

move itself

#

don’t react to the tool

#

ect

#

so

midnight meteor
wheat solar
#

whats your game

#

whats the code look like

#

and when you try what happens

midnight meteor
#

and

#

it happen

#

like

wheat solar
#

so what are we supposed to docrying

midnight meteor
#

the ball move itself

midnight meteor
wheat solar
#

i dont know what it even doesevilcat

midnight meteor
#

i can get it back

#

wait

wheat solar
#

you have to post like all of the code

midnight meteor
#

lemme try to get it back

wheat solar
#

in every involved script

#

and show us whats going wrong when you run it

#

otherwise in order to fix your problem id legit just be making a whole new script

midnight meteor
#

ok so here

#

it the script child of Ball

#

named BallScript

#

aka

#

the physics / hitbox

#

probleme is that the ball move itself and do weird movement

#

and dont react to the toolset

#

that i alr made

wheat solar
#

crying thats so much

midnight meteor
#

asw

wheat solar
#

did you make this

midnight meteor
#

yeah and another method who didn’t work asw

#

local ball = script.Parent

ball.Touched:Connect(function(hit)
local force = Instance.new("VectorForce", ball)
force.Force = (hit.Position - ball.Position).unit *
wait(0.2)
force:Destroy()
end)

midnight meteor
wheat solar
#

and im not sure if you need the wait or not

midnight meteor
wheat solar
#

put everything in a
If hit.Name == "Left Leg" or "If hit.Name == "Right Leg" then

#

this way its only gonna respond to the player kicking it

#

instead of anything

midnight meteor
#

ok and i add torso ect cuz i made header and toros tool asw

wild steepleBOT
#

studio** You are now Level 3! **studio

wheat solar
#

not sure if thats actually the problem but it might help

midnight meteor
#

ok wait i think i understand

#

lemme send u

#

local ball = script.Parent

ball.Touched:Connect(function(hit)
if hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
if hit.Name == "Left Leg" or hit.Name == "Right Leg" or hit.Name == "Torso" or hit.Name == "Head" then
local force = Instance.new("VectorForce", ball)
force.Force = (hit.Position - ball.Position).Unit * 5000
force:Destroy()
end
end
end)

#

like that?

wheat solar
#

no need for the line with "humanoid" i dont think

wild steepleBOT
#

studio** You are now Level 10! **studio

midnight meteor
#

ok

#

local ball = script.Parent

ball.Touched:Connect(function(hit)
if hit.Name == "Left Leg" or hit.Name == "Right Leg" or hit.Name == "Torso" or hit.Name == "Head" then
local force = Instance.new("VectorForce", ball)
force.Force = (hit.Position - ball.Position).Unit * 5000
force:Destroy()
end
end)

#

lemme try that ig

#

it better it detect my thing

#

but some don’t work and detect bad

#

like

#

ball curve asf

#

look weird

#

it go too far

#

and when i start the game

#

without being near the ball

#

the ball move

#

lemme see if it the ball problem

#

ok yeah ball problem

#

@wheat solar

#

problem

#

the bal yk the script there

#

it for touch football like hitbox

#

but rn am trying to do the ball react smooth to my tool

#

and rn it no smooth ball got weird movement i can walk on the ball ect

#

i need help do yk how to

wheat solar
#

what tool

#

wdym

midnight meteor
#

like

#

i made keybind

#

like on the rec

#

look

#

look the ball hitbox

#

and the actual ball hitbox of this script

#

local ball = script.Parent

ball.Touched:Connect(function(hit)
if hit.Name == "Left Leg" or hit.Name == "Right Leg" or hit.Name == "Torso" or hit.Name == "Head" then
local force = Instance.new("VectorForce", ball)
force.Force = (hit.Position - ball.Position).Unit * 5000
force:Destroy()
end
end)

#

ts is more for like

#

touch football hitbox

#

yk

#

or do u want acces of my studio thingy to see more

#

what i meant

wheat solar
#

which ones your game

midnight meteor
#

wym

#

neither

#

it a reference

#

@wheat solar

wheat solar
#

what happens when you use your game

midnight meteor
#

it normal now that i changed ball

#

but when i dribble ect the ball

#

it like touch soccer

#

i can walk in it and it move the ball

#

and with my toolset i can’t move the ball i mean i can but it weird

#

atleast it detect cuz it go to the side where the animation go

wheat solar
#

can you send a video

midnight meteor
#

i cant I can give u acces if u want

wild steepleBOT
#

studio** You are now Level 4! **studio

wheat solar
#

wdym cant

#

whats wrong with ur pc

midnight meteor
#

idk i go 2 fps when i rec

#

and i can’t move my pc for 1 minute

#

before stop the rec

#

@wheat solar ba

wheat solar
#

oh okay

#

wait one thing though

#

do you want the ball to be instantly kicked or do you want to actually keep it on you

#

because each reference video is saying something different

midnight meteor
#

i wanna that if the script detect a shoot animation it shoot and dribble it stay on u

#

like u can air dribble ect

#

i made all the anim

#

already

#

that why i ping u so much

#

i rly need fast cuz this night the toolset need to be done

#

i Alr made the whole thing i jst need the physics

wheat solar
#

ah im not really sure then

midnight meteor
#

do u know someone who know?

#

local ball = script.Parent

ball.Touched:Connect(function(hit)
if hit.Name == "Left Leg" or hit.Name == "Right Leg" or hit.Name == "Torso" or hit.Name == "Head" then
local force = Instance.new("VectorForce", ball)
force.Force = (hit.Position - ball.Position).Unit * 5000
force:Destroy()
end
end)

ball.Touched:Connect(function(hit)
if hit.Name ~= "Left Leg" and hit.Name ~= "Right Leg" and hit.Name ~= "Torso" and hit.Name ~= "Head" then
force.Force = Vector3.new(0, 0, 0)
end
end)

ball.CanCollide = true
ball.CustomPhysicalProperties = PhysicalProperties.new(0.1, 0.3, 0.5, 1, 1)

#

is that better