I’m sorry if the topic title doesn’t make much sense, I have gotten a part to move to an object I have instanced and then stop, such as an order system. I’m attempting to make the part face the direction it is going. I have tried solutions on the dev forum but haven’t found much luck.
local MoveMarker
local createPart = RS.CreatePart
createPart.OnServerEvent:Connect(function(player, pos)
part = Instance.new("Part")
part.Position = pos
part.Parent = workspace
part.Name = "MoveMarker"
part.Size = Vector3.new(1,1,1)
part.BrickColor = BrickColor.new("Really red")
part.Material = "Neon"
part.Transparency = 0.9
part.Anchored = true
end)
while true do
workspace:WaitForChild("MoveMarker")
local TweenService = game:GetService("TweenService")
local MoveMarker = game.Workspace.MoveMarker
local Part = game.Workspace.Part
local tweenInfo = TweenInfo.new(
1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In,
0,
false
)
TweenService:Create(Part, tweenInfo, {Position = MoveMarker.Position}):Play()
wait(1)
MoveMarker:Destroy()
end