#I wanna make a football have more power and make it smoother after it bounces on the ground

1 messages · Page 1 of 1 (latest)

dawn crow
#

I need help cuz i tried everything but it doesnt happen

#

Anyone

chilly rampart
#

cuz u havent provided shit

dawn crow
#

You tell me

#

What you need

chilly rampart
#

maybe fucking anything

dawn crow
#

Its touch

#

So it hits when i touch the ball

#

Ill send a clip

coral zodiac
# dawn crow What you need

To put it more politely, we need to see the code you made so we can help you.

Without code we can't quite tell what you might be doing wrong, or how the code can change to address your issue

dawn crow
#

Ill send it

#

Wow i explained abit wrong but ok

#

@coral zodiac

#

Tell me if u need gui

coral zodiac
# dawn crow

bud, no. Copy & paste that in Discord and format it like it describes in the post guidelines.

That's very difficult to read.

dawn crow
#

Okay

#

Mb

dawn crow
# coral zodiac bud, no. Copy & paste that in Discord and format it like it describes in the pos...

local ball = script.Parent

function onTouched(otherPart)
local character = otherPart.Parent
local humanoid = character:FindFirstChild("Humanoid")
local hrp = character:FindFirstChild("HumanoidRootPart")

if humanoid and hrp then
    local player = game.Players:GetPlayerFromCharacter(character)
    if not player then return end

    local ballStatus = player:GetAttribute("BallStatus") or "H" -- default to H

    local forceDirection = Vector3.new(hrp.CFrame.LookVector.X, 0, hrp.CFrame.LookVector.Z).Unit
    local forceMagnitude

    if ballStatus == "L" then
        forceMagnitude = 30
        ball.Velocity = forceDirection * forceMagnitude

    elseif ballStatus == "H" then
        forceDirection = Vector3.new(hrp.CFrame.LookVector.X, 1, hrp.CFrame.LookVector.Z).Unit
        forceMagnitude = 35
        ball.Velocity = forceDirection * forceMagnitude
    end

    if player then
        game.ServerStorage.LastBallTouch.Value = player.Name
    end
end

end

ball.Touched:Connect(onTouched)

coral zodiac
dawn crow
#

I want it like

#

To go further

#

You get it

coral zodiac
#

or decrease it

dawn crow
#

@coral zodiac ok so can u help me with the last parts too

#

Btw i used 2 scripts for the ball

#

local ball = script.Parent

local function onTouched(hit)
local character = hit.Parent
local humanoid = character and character:FindFirstChild("Humanoid")
local hrp = character and character:FindFirstChild("HumanoidRootPart")
if humanoid and hrp then
-- Get the direction from the player to the ball
local playerToBall = (ball.Position - hrp.Position).Unit
-- Get the player's facing direction
local playerLook = hrp.CFrame.LookVector.Unit
-- Dot product to determine if player is facing the ball (front) or away (back)
local dot = playerToBall:Dot(playerLook)
local forceDirection
if dot > 0 then
-- Player is facing the ball: hit with front, push ball away from player (forward)
forceDirection = playerLook
else
-- Player's back is to the ball: hit with back, push ball toward player (backward)
forceDirection = -playerLook
end
-- Apply velocity to the ball
local forceMagnitude = 40 -- Adjusted for more natural movement
ball.AssemblyLinearVelocity = forceDirection * forceMagnitude
end
end

ball.Touched:Connect(onTouched)

#

this is the other script

coral zodiac
dawn crow
#

It goes to a random way when bouncing

#

I wanna remove the bouncing actually

coral zodiac
dawn crow
coral zodiac