Right below is the Code, what function would I add for LookVector to follow the player's camera?

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DashEvent = ReplicatedStorage.Remote.RemoteEvent.Game.DashEvent

DashEvent.OnServerEvent:Connect(function(Player, Camera)
	local Animation = Instance.new("Animation")
	Animation.AnimationId = "rbxassetid://2966733565"
	local LoadAnimation = Player.Character.Humanoid:LoadAnimation(Animation)
	LoadAnimation:Play()
	
	local Humanoid = Player.Character.Humanoid
	Humanoid.AutoRotate = false
	Humanoid.JumpPower = 0
	
	local Position = Instance.new("BodyVelocity", Player.Character.HumanoidRootPart)
	Position.MaxForce = Vector3.new(10000, 0, 10000)
	Position.P = 100
	Position.Velocity = Player.Character.HumanoidRootPart.CFrame.LookVector * 90
	game.Debris:AddItem(Position, 0.75)
	
	wait(0.75)
	Humanoid.AutoRotate = true
	Humanoid.JumpPower = 50
end)

3 comments

0

What exactly do you mean by make the "LookVector to follow the player's camera". LookVector is a read-only property of CFrame; it can't be changed

0

LookVector is the direction that a part is facing. It cannot be changed, it can only be read.

0

what are you talking about