You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I want the ball to move smoothly
- What is the issue? Include screenshots / videos if possible!
- What solutions have you tried so far?
I have looked into Network Ownership but it doesn’t seem to be helping and I don’t think that that’s the issue
This is my code for the ball
local Animation = script.KickAnimation
local player = game.Players.LocalPlayer
local Character = player.Character
local Humanoid = Character:WaitForChild ("Humanoid")
local Anim = Humanoid:LoadAnimation(Animation)
script.Parent.MouseButton1Up:Connect(function()
local folder = workspace.BallStorer
for i,v in pairs(folder:GetChildren()) do
if v.Name == "ShootBall" then
if v.Owner.Value == player.Name then
v.Touch.Enabled = false
local Number = math.round((script.Parent.Parent.Frame.Size.Y.Offset/443)*100)
script.Parent.Parent.Number.Value = Number
script.Parent.Parent.Visible = false
Anim:Play()
wait(0.6)
local HasBall = player.HasBall.Value
local ball = v
for _,v in ipairs(player.Character.UpperTorso:GetDescendants()) do
if v:IsA("Weld") then
v:Destroy()
end
end
ball.Parent = workspace
local humanoidRootPart = player.Character:FindFirstChild("HumanoidRootPart").Position
local forceDirection = (humanoidRootPart - ball.Position).unit
forceDirection = Vector3.new(forceDirection.x, -1, forceDirection.z)
local forceMagnitude = player.PlayerGui.HitNetLesson.Frame.Number.Value*-1.55
ball.Velocity = forceDirection * forceMagnitude
end
end
end
end)
Thank you!