gcgthebomb
(AHNotTheFace)
July 12, 2024, 10:53pm
#1
I’ve been making a game involving missiles, and none of the things like CFrame.LookAt have been working, so I instead decided to move to constraints.
I’ve been trying to set the LookAt position for AlignOrientation but it doesn’t change according to the explorer.
This is the code I have so far relating to AlignOrientation
lookPart.AlignOrientation.LookAtPosition = target.Position
lookPart.AlignOrientation.Enabled = true
It just doesn’t change anything. I couldn’t find something similar on other posts as well.
1 Like
Synteuro
(Synteuro)
July 12, 2024, 11:07pm
#2
Have you set the AlignType
of your AlignOrientation
object to Enum.AlignType.PrimaryAxisLookAt
before assigning the LookAtPosition
property?
Also, ensure your alignment mode is set to OneAttachment
.
gcgthebomb
(AHNotTheFace)
July 12, 2024, 11:08pm
#3
I have preset both options inside the explorer before running the game.
Synteuro
(Synteuro)
July 12, 2024, 11:12pm
#4
When you set the property in your script, it doesn’t update in the properties panel?
If so, are you sure your script is reaching the point where it sets the property (LookAtPosition
)?
gcgthebomb
(AHNotTheFace)
July 12, 2024, 11:15pm
#5
I just realized that the script does not reach that point. I’m going to attempt to fix it and reply to you if it works.
1 Like
gcgthebomb
(AHNotTheFace)
July 12, 2024, 11:24pm
#6
So the problem is fixed as in the LookAt position is set, but now the missile does not actually look at the target. However, that is a separate problem and I might be creating a new topic for that. Thank you for helping me!
1 Like
system
(system)
Closed
July 26, 2024, 11:25pm
#7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.