--Server Script
player.Character.PrimaryPart:SetNetworkOwner(nil) --Setting network owner to the server
task.wait()
if humanoid:GetState() == Enum.HumanoidStateType.Freefall then --Checking if the player is in the freefall state
humanoid:ChangeState(Enum.HumanoidStateType.Jumping) ---infinite jumping
end
What is the problem?
I cannot jump without it lagging. I don’t want to jump on the client because exploiters can abuse my script and obtain it for free without having to pay for a dev product
This is a universal issue that all developers face. If there is no way around this, I am submitting this as a bug report for Roblox to investigate. Please help if you can and thank you!
Consider not switching ownership of the character. This code fails to limit exploiters in the way you may be expecting; they can infinitely jump whenever they’d like to. They’re able to do this regardless of whether you implement infinite jumping for the honest clients. A server anticheat would be the right choice here.
I suppose if you didn’t allow characters to fly up even if they had purchased the product, then yes it would. Any developer implementing anticheat can understand what states the players might be in and make, say, a Y position anticheat exclusion for players who have bought that product.
This idea sounds like rainbows and unicorns until you realize exploiter can spoof instances into themselves and when you check they bought the product the exploiter can pretend they bought it and use it however they like
What you’re experiencing isn’t lag, it’s ping. Setting the network ownership of the player to the server is always going to create this issue. This is because the client is now sending data to the server for physics, instead of doing the physics calculations locally.
I would only set the network owner of the character to nil if the player should not be moving their character, for example, an animation death, or being pulled into a black hole.
As for your exact issue, from what i can gather, you’re concerned that exploiters will steal your infinite jump script, and use it without paying for the gamepass.
However, exploiters can infinitly jump anyway, as they can make their own scripts, so them stealing your scripts is not a concern.
I would just look at a server-sided anti-cheat, like deleteables said. I know very little about anticheats, so i would advise looking it up online.
Exploiters aren’t able to fake developer product purchases when the server honors the official method of processing their purchases. If a player is faking Instances of their character, they’re either not replicated and irrelevant to the server and other players or a server anticheat is able to detect their invalid parts.
You have not provided how to perform infinite jump on the server. I greatly appreciate your help but I would need a fix for the script I provided because otherwise, it will result in the original problem where we are doing checks on the client because that’s where you can jump infinitely without experiencing ping
Character movement is traditionally done on the client. Jumping is also done on the client. All replicated changes take time to be sent and that causes your serverside jumping to be laggy. I’m afraid there isn’t much to work with here. I wasn’t suggesting a server solution for infinite jumping because that’s not viable without lag.
That is the answer I was looking for. Thank you so much. I will be submitting this as a bug report because this is not the correct behavior coming from Roblox’s engine and is an issue that devs have faced for too long without a solution