Hello, ive been struggling to get this very simple model to move positions but I fail, how do I make it move? Ive searched the dev forum and documentations but I still dont understand. Any help would be appreciated!
newFriend:SetPrimaryPartCFrame(newFriend.PrimaryPart.CFrame.Position == Vector3.new(-1141.055, 4.179, -936.464))
newFriend:SetPrimaryPartCFrame(newFriend.PrimaryPart.Orientation == Vector3.new(0, 30, 0))
i have no idea if the code above is HOW i should execute it but either way it gives me errors in the output
Let me quickly explain what the == operator does. If both statements are equal, then it will return true, otherwise, it will return false.
At the moment you are trying to set the primary CFrame of a model to a boolean.
Try something like this instead.
newFriend:SetPrimaryCFrame(CFrame.new(Vector3.new(-1141.055, 4.179, -936.464)))
Thats very simple wow, how would I set its orientation with this?
newFriend:SetPrimaryCFrame(CFrame.new(Vector3.new(-1141.055, 4.179, -936.464)) * CFrame.Angles(math.rad(30), math.rad(30), math.rad(30))))
Replace the 30s with the actual X Y and Z angles.
The math.rad is there because CFrames use radians.
Ah thank you for the help! I was really stuck.
If you wish to find out more about CFrames, you can read about them here .
1 Like
system
(system)
Closed
April 23, 2023, 11:45pm
#7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.