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

Why are we multiplying here?

 wpad.CFrame = CFrame.new(workspace[admin].Torso.Position) * CFrame.fromEulerAnglesXYZ(0,math.rad(i),0) * CFrame.new(0,0,-dis) * CFrame.Angles(math.rad(i),math.rad(i),math.rad(i))

I cant figure out why we multiply here, can anyone explain please?

2 comments

0

Is this to find the distance of one object from another?

0

No, that is entirely irrelevant to what this is.

1 answer

✓ Accepted answer

CFrames are a rotation matrix; you are multiplying matrices. The second matrix translates the first in relative object space.

CFrame.new(workspace[admin].Torso.Position) is a frame without rotation

CFrame.fromEulerAnglesXYZ(0,math.rad(i),0) rotates it about its own relative Y axis

CFrame.new(0,0,-dis) moves it relatively backwards

CFrame.Angles(math.rad(i),math.rad(i),math.rad(i))is another rotational factor

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