Hey. I want to make the player glide(fall slower) using body velocity: A script creates the BodyVelocity, it parents it to the UpperTorso and it sets its properties, but for some reason the script doesn't create the BodyVelocity. Here's the script:
local userinputservice = game:GetService("UserInputService")
player = game.Players.LocalPlayer
local character = player.Character
mouse = player:GetMouse()
humanoid = character.Humanoid
userinputservice.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.Space then
print("Gliding now...")
animTrack:Play()
print("playing animtrack")
local f = Instance.new("BodyVelocity")
print("f created")
f.Parent = character.UpperTorso
print("UpperTorso it is")
f.Name = "GlideHelper"
f.MaxForce = Vector3.new(0, 99999, 0)
f.P = 1250
f.Velocity = Vector3.new(0, -10, 0)
print("properties set")
end
end)
It prints everything in that code but nothing works, except the animTrack. I've checked the UpperTorso in-game: There is not BodyVelocity there when I press Space. So... help?

2 comments
It works :D Thanks!!
It is better to set the Parent than pass the variable into Instance.new() (137 times slower) Source: https://devforum.roblox.com/t/psa-dont-use-instance-new-with-parent-argument/30296/2