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

How do I make these wings move?

I want to make the wings rotate and look like they are fluttering. In order to do this, I have to make them rotate anchored on one side.

Nothing happens and I get an error.

This is my script so far:

local lWing = script.Parent.lWing
local rWing = script.Parent.rWing
local lw_cframe = script.Parent.lWing.CFrame
local rw_cframe = script.Parent.rWing.CFrame

script.Parent.lWing.CFrame = CFrame.new(CFrame.Angles(0, math.rad(90), 0))
script.Parent.rWing.CFrame = CFrame.new(CFrame.Angles(0, math.rad(90), 0))

This is the error log:

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

Thank you for any help!

1 answer

You get the error because CFrame requires Vector3 parameters... not additional CFrame values.

Try maybe

	script.Parent.lWing.CFrame = lw_cframe * CFrame.Angles(0, math.rad(90), 0)
	script.Parent.rWing.CFrame = rw_cframe * CFrame.Angles(0, math.rad(90), 0)

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