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

why my scripting not sending the player into the air?

game.Players.PlayerAdded:Connect(function(player)
	player.Chatted:Connect(function(msg)
		msg = string.lower(msg)
		if msg == "/kaboom" then
			print("KABOOM")
			game.Workspace.Lightning_Bolt:Play()
			for i,v in pairs(game.Players:GetPlayers()) do
				v.Character.Humanoid.JumpPower = 275
				v.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
			end
		end
	end)
end)

1 comment

0

humanoid.Jump = true

1 answer

✓ Accepted answer

To force a player to jump, the best and most reliable way is probably just using humanoid.Jump, this quite literally forces the player to jump when set to true. It can be used like this:

(player).Character.Humanoid.Jump = true

For you on line 9 changing v.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping) to simply v.Character.Humanoid.Jump = true should do the trick.

Accept this if it works or helps you solve it!

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