NOT A REQUEST! This is in a regular script in workspace. This disables jumping What I want is for a person not to be able to jump when they touch a vehicle part. How would I do that?
game.Players.PlayerAdded:connect(function(player) -- This is when player joins
player.CharacterAdded:connect(function(character)
local humanoid = character:findFirstChild("Humanoid")-- We are making a variable for the Humanoid
if humanoid then -- If player then
humanoid.Changed:connect(function(property)--We are messing with the player now
if humanoid.Jump == true then-- When the player trys to jump
humanoid.Jump = false -- This wont let Him.
humanoid.Sit = false
humanoid.PlatformStand = false
end
end)
end
end)
local character = player.Character
if character then
local humanoid = character:findFirstChild("Humanoid")
if humanoid then
humanoid.Changed:connect(function(property)
if humanoid.Jump == true then
humanoid.Jump = false
humanoid.Sit = false
humanoid.PlatformStand = false
end
end)
end
end
end)

3 comments
So this script disables jumping?
This does not work
It doesn't work because the character jumps before the Jumping event fires. You need to use RunService's RenderStepped event to make it work instead of the Jumping event, which you need to do in a LocalScript.