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

how come the part isn't rotating?

Asked by
Tizzel40 243 Moderation Voter
5 years ago
local part = script.Parent

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

part.CFrame = CFrame.fromEulerAnglesXYZ.Vector3 + Vector3.new(0,math.rad(1),0)
end
0
It's part.CFrame = CFrame.fromEulerAnglesXYZ(0, math.rad(1), 0) + Vector3.new(x, y, z) User#19524 175 — 5y
0
Your current script attempts to index a function value. Attempting to do so results in an error. User#19524 175 — 5y
0
hmmmmmmm Tizzel40 243 — 5y
0
wait my part just disapered what do i put in the Vector3.new(x,y,z) Tizzel40 243 — 5y

1 answer

Log in to vote
0
Answered by
piRadians 297 Moderation Voter
5 years ago
Edited 5 years ago

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

0
Upvoting would be very appreciated if this has helped you learn. piRadians 297 — 5y
Ad

Answer this question