Hi, I’m trying to make a slide script in which the player is pushed in whatever direction they’re moving when you press a button. I have everything set up but when I try to set the VectorForce.Force to Humanoid.MoveDirection, it doesn’t seem to work. I ran a test where I printed tostring(Humanoid.MoveDirection) and that printed a Vector3 showing my exact move direction, so I really have no idea what’s wrong with the VectorForce. Here’s my code:
local LP = game.Players.LocalPlayer
local Hum = LP.Character.Humanoid
local SlideForce = Instance.new("VectorForce")
SlideForce.Name = "SlideForce"
SlideForce.ApplyAtCenterOfMass = true
SlideForce.Parent = LP.Character.PrimaryPart.RootRigAttachment
SlideForce.Attachment0 = LP.Character.PrimaryPart.RootRigAttachment
SlideForce.Force = Vector3.new(Hum.MoveDirection)
SlideForce.Enabled = true
Thanks!