Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I change the JumpPower value of a humanoid with FE on?

Hello

I am currently attempting (even though I really suck at FE) to change the JumpPower value of all players in the server. Without FE on, I'd use this script: (note I'm using a GUI)

for _, player in pairs(game.Players:GetPlayers()) do
	if player.Character then
		local h = player.Character:FindFirstChild("Humanoid")
		h.JumpPower = 50
	end
end

Now I tried using this:

function hello(ahnon)
	return game.Workspace[ahnon].Humanoid.JumpPower == 0
end

game.ReplicatedStorage.parto.OnServerInvoke = hello

The script above is located and workspace, I have a remotefunction located in replicatedstorage named "parto" and the screengui with the script is located in startergui.

I also got this error after http://prntscr.com/ja1ogv

Thanks

1 answer

✓ Accepted answer

You should choose better variable names than things like hello or h or ahnon. Besides that, you don't need a RemoteFunction. Why return the jump power? What's the point of that, the client can access it just fine.

The error is caused by you trying to index game.Workspace with the player's player object. To get the player's character, just index player.Character (and make sure it's not nil).

Anyway, because Roblox default character networking is insecure and client-authoritative, you can simply change the jump power client-side with no need to get the server involved.

This discussion is preserved as it was. New answers, comments, and votes are closed.