Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[Solved] When vector3 expected, I put vector3 but then expects cframe?

invalid argument #1 to 'new' (Vector3 expected, got CFrame)

The code makes a new part point towards a part but changes cframe, the problem is that it expects a vector3 for the first argument and when I put in a vector 3 it expects a cframe? Can someone help me on what I'm doing wrong?

local rocket = Instance.new("Part", workspace)
rocket.Anchored = true
rocket.Size = Vector3.new(1,1,4)
rocket.CFrame = CFrame.new(HRP.CFrame * CFrame.new(0,0,-2.5)) -- gives error
rocket.CFrame = CFrame.new(rocket.Position, AOE.Explosion.PrimaryPart.Position)

1 answer

Sorry, nothing wrong with this... It just didn't want CFrame.new!

This discussion is preserved as it was. New answers, comments, and votes are closed.