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

Can't set JumpPower....? You guys on Discord weren't usefull lol

**BIG EDIT. I'm just stupid. I had a clone of my char in workspace, with the exact name... it edited it's humanoid, not mine... **

So, i cannot change a Humanoids JumpPower (or disable it)

These are my scripts.

This script (normal) is in a seat:

local Seat = script.Parent
local Deb = false
local FreezePlayerRemote2 = game.workspace.SystemRemotes:WaitForChild('FreezePlayerRemote') --RemoteEvewt
local UnFreezePlayerRemote = game.workspace.SystemRemotes:WaitForChild('UnFreezePlayerRemote')

script.Parent.Touched:Connect(function(hit)
local player = game:GetService('Players'):GetPlayerFromCharacter(hit.Parent)
    if player then
		local Speler = player.Name
		print(player.Name)
		FreezePlayerRemote2:FireAllClients(Speler)
    end
end)

This script (below) is inside StarterCharacterScripts as a LocalScript

local FreezePlayerRemote = game.workspace.SystemRemotes:WaitForChild('FreezePlayerRemote') --RemoteEvewt
local UnFreezePlayerRemote = game.workspace.SystemRemotes:WaitForChild('UnFreezePlayerRemote')

function FreezePlayer(Speler)
print('Received')
local Humanoid = game.Workspace[Speler].Humanoid
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
end


function UnFreezePlayerRemote(Speler)
end


FreezePlayerRemote.OnClientEvent:Connect(FreezePlayer)

HELP?

4 comments

0

Is this to change an npc's jump hieght? If so, make the scripts parent to the npc itself

0

No, it's for a player so he can't live the seat while the cart is moving

0

What do you mean by live the seat??????

0

Sorry. i meant Leave :P

1 answer

✓ Accepted answer

Try doing this:

humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)

You can read more here: https://developer.roblox.com/en-us/api-reference/function/Humanoid/SetStateEnabled

2 comments

0

I've tried it before, and now again. But it still doesn't work. I edited my original message btw.,

0

It does work, you aren't using it correctly. Use it in the original server script

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