【发布时间】:2021-05-09 08:44:05
【问题描述】:
好的,所以我正在编写一个快速对齐函数,然后运行它。它应该可以工作,但我收到此错误:
<eof>在“结束”附近除外
function Align(Part1,Part0,Position,Angle,name)
local AlignPos = Instance.new("AlignPosition", Part1);
AlignPos.Parent.CanCollide = false;
AlignPos.ApplyAtCenterOfMass = true;
AlignPos.MaxForce = 67752;
AlignPos.MaxVelocity = math.huge/9e110;
AlignPos.ReactionForceEnabled = false;
AlignPos.Responsiveness = 200;
AlignPos.RigidityEnabled = false;
local AlignOrient = Instance.new("AlignOrientation", Part1);
AlignOrient.MaxAngularVelocity = math.huge/9e110;
AlignOrient.MaxTorque = 67752;
AlignOrient.PrimaryAxisOnly = false;
AlignOrient.ReactionTorqueEnabled = false;
AlignOrient.Responsiveness = 200;
AlignOrient.RigidityEnabled = false;
local AttachmentA=Instance.new("Attachment",Part1);
local AttachmentB=Instance.new("Attachment",Part0);
AttachmentB.Orientation = Angle
AttachmentB.Position = Position
AttachmentB.Name = name
AlignPos.Attachment0 = AttachmentA;
AlignPos.Attachment1 = AttachmentB;
AlignOrient.Attachment0 = AttachmentA;
AlignOrient.Attachment1 = AttachmentB;
end
所以我想知道,有没有办法解决这个问题?
因为它应该工作
【问题讨论】: