Moving players using body velocity

Hello i am doing this tutorial

but i don’t know how to move a player using body velocity

script:
local UIS = game:GetService(“UserInputService”)

local player = game.Players.LocalPlayer
local character = player.CharacterAdded:Wait()

local isClimbing = false

local Humanoid = character:WaitForChild("Humanoid")

    UIS.InputBegan:Connect(function(Key)
    	if Key.KeyCode == Enum.KeyCode.LeftControl then
    		if isClimbing == false then
    			local origin = character.HumanoidRootPart.Position
    			local direction = character.HumanoidRootPart.CFrame.LookVector*3
    			local result = workspace:Raycast(origin, direction)
    			
    			if result then
    				character.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
    				local Gyro = Instance.new("BodyGyro")
    				Gyro.Parent = character.HumanoidRootPart
    				Gyro.CFrame = CFrame.new(Vector3.new(), -direction)
    				isClimbing = true
    				Humanoid.PlatformStand = true
    				print(result.Instance.Name)
    			end
    		else
    			Humanoid.PlatformStand = false
    			isClimbing = false
    		end
    	end
    end)
2 Likes