Hi!
I am the least experienced scripter in the history of scripters, and I am in need of help.
The thing I need is a brick which forces the player to sit, but prohibits them to jump.
This brick is to put at the start of a slide. I want the player to sit all the way through the slide down, so they can't simply jump and walk down.
A script I pulled out of the free models library (I'm sorry guys, if I could script myself, I would do it) already takes care of the sitting part:
enabled = true
function onTouched(hit)
if not enabled then return end
enabled = false
local h = hit.Parent:findFirstChild("Humanoid")
if (h ~= nil) then
h.Sit = true
end
enabled = true
end
script.Parent.Touched:connect(onTouched)
It is possible that only a single line of code is enough to make this work, but unfortunately I have yet to be successful.
The player should be allowed to jump again when the bottom is reached (or if they die).
I hope someone can help me! Thanks in advance.

6 comments
Humanoid has tis property called 'jump power,' when set to 0, the player will be unable to jump. Revert it back to 50 for regular jump
Also findFirstChild is depricated use :FindFirstChild instead.
Thanks! It kind of works. When the brick is touched, I sit down, but I can get out of it anyways by jumping. I don't actually jump into the air, but it cancels out the sitting anyways. Any solution for that?
@Jesse, sorry I haven't been scripting for roughly 5 years now so I didn't know.
Turning down JumpPower will work, but using the Sitting property on the player is much more effective
Yes sir, but my script does exactly that