Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Moving part with cframe in different directions?

Asked by
PropzFx 27
5 years ago

Hi im need help with my script. i have 2 lasers and same code in both and im using cframe to move the part. One of them moves perfectly and the other one did some voodoo magic and went crazy. I have tried to use laser2.CFrame.LookVector but i get this error: Workspace.LaserJump.Laser2.GameScript:29: bad argument #2 to '?' (Vector3 expected, got CFrame)

local tween2Start = tweenService:Create(laser2, tweenInfo2, {CFrame = laser2.CFrame.LookVector + CFrame.new(-86.1, 16, -175)})
tween2Start:Play()

Heres the script with the error in it: (without lookvector) heres a video how it looks like: https://gyazo.com/7588dfa6ad1fe326425cf823372073e3

local tween2Start = tweenService:Create(laser2, tweenInfo2, {CFrame = CFrame.new(-86.1, 16, -175)})
0
I believe that you have to use Vector3.new instead of CFrame.new after the +. User#24093 0 — 5y

Answer this question