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

Object not rotating to my character?

Asked by 7 years ago
Edited 7 years ago

Making a flying object that follows me, but it's not rotating to my character?

script.Parent.MouseButton1Click:connect(function()  
print (script.Parent.Value.Value)
while true do
wait()
drone.MainPart.BodyPosition.Position = Vector3.new(script.Parent.Parent.FOLLOWME.Value.Value.X, script.Parent.Parent.FOLLOWME.Value.Value.Y, script.Parent.Parent.FOLLOWME.Value.Value.Z)
drone.MainPart.BodyAngularVelocity.AngularVelocity = Vector3.new(-script.Parent.Parent.FOLLOWME.Value2.Value.X, -script.Parent.Parent.FOLLOWME.Value2.Value.Y, -script.Parent.Parent.FOLLOWME.Value2.Value.Z)
base.BodyPosition.P = 8000
drone.MainPart.BodyPosition.Position = drone.MainPart.BodyPosition.Position + Vector3.new(-50,25,0)     
end
end)

1 answer

Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
7 years ago

You need a BodyGyro to rotate an object. BodyPosition just makes it float towards the given vector.

0
And how do I set it so it only uses X and Z DjinoKip 78 — 7y
0
In the MaxForce property, set its y value to 0: bodyGyro.MaxForce = Vector3.new(x, 0, z) Master_JJ 229 — 7y
0
Does not exist.. DjinoKip 78 — 7y
0
What do you mean "does not exist"? GoldenPhysics 474 — 7y
0
It does exist. Check the properties list. RubenKan 3615 — 7y
Ad

Answer this question