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

I can't rotate a part with CFrame?

Asked by
walvie 12
5 years ago
Edited by User#5423 5 years ago

This question has been solved by the original poster.

I am trying to make a Part rotate with CFrame but i can't and i don't know why.

Here is the script:


wait(3) local block = game.Workspace.Rotating local newCFrame = CFrame.Angles(0, math.rad(45), 0) block.CFrame = newCFrame --Rotating is the name of my part.

Please tell me what i am doing wrong.

0
block.CFrame = block.CFrame * CFrame.Angles(0, math.rad(45), 0) DeceptiveCaster 3761 — 5y
0
Thank you very much! walvie 12 — 5y
0
pls use code block. User#5423 17 — 5y
0
you cant in a comment AradIsHere 2 — 5y
0
@AradIsHere for the question... User#5423 17 — 5y

1 answer

Log in to vote
0
Answered by
danglt 185
5 years ago

when creating a CFrame or Vector3 you need to add .new to make it existing Also when rotating you use Vector3 not CFrame.

wait(3)

local block = game.Workspace.Rotating 

local newVector = Vector3.new(0, math.rad(45), 0)

block.CFrame = newVector

--Rotating is the name of my part.
0
oh already was solved oof danglt 185 — 5y
Ad

Answer this question