ball:SetNetworkOwner(player)
print(ball:GetNetworkOwner(),"IS BALL OWNER")
ball.CurrentMove.Value = "Long"..moveName
ball.LastHit.Value = player
ball.Shield.Value = true
local character = player.Character
local direction = character.PrimaryPart.CFrame.LookVector
local speedBase,maxForce,timeApplied,yForceBase,yForceConstant,speedConstant = table.unpack(powerHolder.Long[moveName])
local speed = speedBase + (currentPower * speedConstant)
local yForce = yForceBase + (currentPower * yForceConstant)
ball.AssemblyAngularVelocity = Vector3.new(50,0,0)
if moveName == "F" then
local ocCurveVector = (character.PrimaryPart.CFrame * CFrame.fromEulerAnglesXYZ(0 ,math.pi / 2, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), 0, 0)).LookVector
networkingModule:ApplyForce(ocCurveVector*150,1.5,ball)
networkingModule:ApplyLinearVelocity(direction*Vector3.new(1,0,1),speed,maxForce,yForce,timeApplied,ball,true)
else
networkingModule:ApplyLinearVelocity(direction*Vector3.new(1,0,1),speed,maxForce,yForce,timeApplied,ball)
print("VELOCITY APPLIED")
end
I have a script that applies a velocity to the ball through a RemoteEvent, before applying the velocity however the player receives network ownership.
There’s an issue with this for some reason and it is related to the network ownership transfer. Sometimes, if another player has network ownership of the ball, and you hit it, the ball doesn’t move. Despite the Velocities being applied (Through explorer I did confirm that the velocities were being applied). I tested while setting the network owner to server, and it worked fine. The ball doesn’t move for the first hit, it moves for the second though.