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

Angle of my model keep changing when I use CFrame on it. What can I do?

Asked by
Sindrotex -41
6 years ago
Edited 6 years ago

So I had a bunch of cylinders that I've putt in a model. That model was rotated to 90 on Z. So I made a primary part and used CFrame to make the whole model go down.

local upcframe = CFrame.new(x, y, z)*CFrame.Angles(0, 0, 90)
local downcframe = CFrame.new(x, y, z)*CFrame.Angles(0, 0, 90)
local model = game.Workspace.Model
local center = model.randompartfromthemodel

model.PrimaryPart = center

while true do
wait(2)
model:SetPrimaryPartCFrame(downcframe)
wait(2)
model:SetPrimaryPartCFrame(upcframe)
end

But now when it goes down it change the angles. Could it be because I have a part (that is not included in model) below the model? if not, then what can I do to fix it?

0
use codeblocks which are ~ so we can read your script correctly mixgingengerina10 223 — 6y
0
Because you're multiplying the angles!! I feel like this isn't even your script since you don't know what you're doing. User#19524 175 — 6y
0
if I dont the angle will change anyways. Sindrotex -41 — 6y
0
I already tried to modify, remove and add angles but it doesnt work. Also what do you mean it isnt my script? Sindrotex -41 — 6y
0
I said cylinder not part or brick because they are not like usual parts. They spawn diferently. If I dont add an angle it will still change my model appearance. Sindrotex -41 — 6y

1 answer

Log in to vote
0
Answered by
Sindrotex -41
6 years ago
Edited 6 years ago

I finaly found the answer. Because of the buggy angles, I used a brick as the primary part of the model because bricks spawn ,,normalyā€¯ so you dont have to rotate them. It took me long enough to figure it out, sometimes I simply dont think about all the ways I can do a job.

Now how do I close this question???

Ad

Answer this question