BodyPosition acts to elastic at first, then fixes itself?

Hello, I am making an air hockey game in roblox, and the movement of the paddle in my game is through a body position. And in the game, at first the body position acts to elastic. but after shaking the paddle for a bit; it fixes itself. If anybody needs more information or screenshots to help solve my issue, I’ll gladly provide. if anybody has a solution for this it would be great. thanks in advance!
-quackywhackity.

sos1

game.ReplicatedStorage.MovePuck.OnServerEvent:Connect(function(Player,Hit)

	local AirTable = workspace.Table
	local PlayerColor

	if AirTable.Colors.Blue.Value == Player.Name then
		PlayerColor = "Blue" 
	elseif AirTable.Colors.Red.Value == Player.Name then
		PlayerColor = "Red"
	end

	if PlayerColor then


		local Position = Vector3.new(Hit.X,4.354,Hit.Z) 
		local PlayArea = AirTable.PlayingArea["Collision"..PlayerColor]



		if Position.X > (PlayArea.Position.X + (PlayArea.Size.X/2)) then
			Position = Vector3.new((PlayArea.Position.X + (PlayArea.Size.X/2))      , Position.Y,Position.Z)

		elseif	Position.X < (PlayArea.Position.X - (PlayArea.Size.X/2)) then
			Position = Vector3.new((PlayArea.Position.X - (PlayArea.Size.X/2))      , Position.Y,Position.Z) 

		end


		if Position.Z > (PlayArea.Position.Z + (PlayArea.Size.Z/2)) then
			Position = Vector3.new(Position.X     , Position.Y,(PlayArea.Position.Z + (PlayArea.Size.Z/2)) ) 

		elseif	Position.Z < (PlayArea.Position.Z - (PlayArea.Size.Z/2)) then
			Position = Vector3.new(Position.X     , Position.Y,(PlayArea.Position.Z - (PlayArea.Size.Z/2)) ) 

		end


		AirTable.Paddles[PlayerColor.."_Paddle"].BodyPosition.Position = Position


	end
end)

I would recommend using AlignPosition (roblox.com) instead of BodyPosition as it is a newer version of it. It might fix itself once it has been switched.

1 Like

I just tried doing what you said, and the issue has remained. Here are the properties of the AlignPosition if you can see if I did anything wrong:

you should try setting the network owner of the part, to the client

Paddle:SetNetworkOwner(Player);
1 Like

this solved my problems, thank you!

hey I forgot to let you know, what this is that it’s letting the client handle the physics, which is dangerous since hackers can easly manipulate the paddle’s actions
so I suggest making an invisible paddle that the server have controll of, and handle detections and such things.
and the paddle with that have network owner set to the client should be there just for the clean visual