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

how come the part isn't rotating?

local part = script.Parent

for i = 1,50 do
	wait(.1)

part.CFrame = CFrame.fromEulerAnglesXYZ.Vector3 + Vector3.new(0,math.rad(1),0)
end

4 comments

0

It's part.CFrame = CFrame.fromEulerAnglesXYZ(0, math.rad(1), 0) + Vector3.new(x, y, z)

0

Your current script attempts to index a function value. Attempting to do so results in an error.

0

hmmmmmmm

0

wait my part just disapered what do i put in the Vector3.new(x,y,z)

1 answer

✓ Accepted answer

You replaced ( with a . And you also assigned a bad argument to the fromEulerAnglesXYZ. Note that Vector3 by itself is a table, not a Vector.

You also need to multiply the CFrame, not add Vectors.

local part = script.Parent

for i = 1,50 do
    wait(.1)

part.CFrame =part.CFrame * CFrame.fromEulerAnglesXYZ(0,math.rad(1),0)
end

1 comment

0

Upvoting would be very appreciated if this has helped you learn.

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