I’m currently experiencing an issue in my Roblox game where there is a delay between the execution of my script and the touch of my sphere. I’m unsure if the problem is caused by my use of the ApplyImpulse function.
local ball = script.Parent
local counter = 0
if hit.Parent:FindFirstChild("Humanoid") then
ball:ApplyImpulse(hit.CFrame.LookVector.Unit * 3000)
print(counter, ": ", hit.CFrame.LookVector.Unit * 3000)
counter += 1
The script in question uses ApplyImpulse to apply a force to the sphere in order to move it. The sphere is set to be transparent and the lookvector is used to determine the direction of the impulse. Despite my efforts to troubleshoot and debug the problem, I have been unable to find the cause of the delay. I have included a video that illustrates the problem in more detail.
If anyone has any experience with similar issues or has any suggestions, I would greatly appreciate it. I’m trying to find a way to eliminate the delay and improve the overall performance of my game.
Is it possibly that ApplyImpulse is causing the problem or is it something else?
Any feedback would be greatly appreciated. Thank you in advance.
If you’re talking about the NetworkOwner, you’ll only need to run SetNetworkOwnerAuto() once. If you’re talking about the movement forces, yes, you’ll have to locally listen for touches, and locally apply the forces.
This should reflect to the server, as the player should be the network owner the moment they touch the ball.
Yes. And it will likely happen. Unfortunately, there isn’t much that can be done, without sacrificing smoothness.