Problem with sit and bodyposition

Hello everybody, I have a problem with my game. Normally, when the tall girl slap me, I am pushed and make me sit. But after multiple times, it stop push me and make me sit, when I print the sit boolean to see if the sit is false, it’s true but while I am standing and yet not sitting. PLEASE HELP ME : (

I’m not very great at things like this, but what i would do is set the sit bool to false when you press jump to get up.

I can’t really make a script at the moment, but if you’d like me to, I will try when I’m available.

Basically, check for when the player presses “space” and then set the sit bool to be false, even if he’s standing up.

If you do want the code, some more information would be appreciated, like how the character gets sitted tljn the first place, and some code.

I do this script, what do you think ?

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		char.Humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
			char.Humanoid.Sit = false
			for i, BodyP in pairs(char.PrimaryPart:GetChildren()) do
				if BodyP:IsA("BodyPosition") then
					print("FOUND BODYPOSITION")
				end
			end
			print("ok")
		end)
	end)
end)

i checked the script that you gave me really quickly, and can confirm that the jump mechanic works, sit gets disabled.

however, this doesnt work

for i, BodyP in pairs(char.PrimaryPart:GetChildren()) do
	if BodyP:IsA("BodyPosition") then
		print("FOUND BODYPOSITION")
	end
end

unless my character is built different, the primary part of the character is HumanoidRootPart, and the only children is has are various sounds the game plays (like climbing and dying), and these:

image

that part can (and probably should) get deleted, as i really dont understand why you need a body position

if you need the position, you can get the primary part position by doing

print("Character's Body Position: "..char.PrimaryPart.CFrame.Position)

forgot to put this the first time, if you this still doesnt work, try putting this

char.Humanoid:GetPropertyChangedSignal("Sit"):Connect(function()
	wait(3)
	char.Humanoid.Sit = false
end)

this, in theory, should automatically disable sit if the player doesnt jump and manually sit down. add more in wait if necessary

hope i helped!

I need the bodyPosition for push player away

I am not strong in this subject, but it appears that the girl that pushes you away just sends you flying, and turns “Sit” on.

I can’t give you code to recommend, but perhaps, instead of using body position, try using velocity?

I would spawn a block, invisible, thin, at the feet of the girl, and give it 100 velocity via server script. Then spawn in the block when she hits, right under players feet.

That way, sit will be turned on, and you will be flung. But that’s my suggestion

If you like the way your code works right now, then that’s great! If not, please specify if you need help and with what