I’m having trouble with this weird error. I heard that, to get a cframe RELATIVE to another cframe, you have to multiply the two like this
newcframe = relativecframe * originalcframe
where “relativecframe” is the cframe you’re trying to place “originalcframe” relative to.
I’m trying to do this on this line of code:
cameraholder.CFrame += cameraholder.CFrame * nextMovement()
it’s not working. nextMovement()
returns a vector3 value. here’s how it looks:
function nextMovement()
local nextMove = Vector3.new()
if uis:IsKeyDown("A") or uis:IsKeyDown("Left") then
nextMove += Vector3.new(-1,0,0)
end
if uis:IsKeyDown("D") or uis:IsKeyDown("Right") then
nextMove += Vector3.new(1,0,0)
end
if uis:IsKeyDown("W") or uis:IsKeyDown("Up") then
nextMove += Vector3.new(0,0,-1)
end
if uis:IsKeyDown("S") or uis:IsKeyDown("Down") then
nextMove += Vector3.new(0,0,1)
end
if uis:IsKeyDown("E") then
nextMove += Vector3.new(0,1,0)
end
if uis:IsKeyDown("Q") then
nextMove += Vector3.new(0,-1,0)
end
return nextMove * currentspeed
end
currentspeed is an integer and cameraholder is a part.
Someone help me with this, I’m getting tired of errors.