Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Tweening and pathfinding not working?

I originally made the model (server side) follow a part which it did and it worked flawlessly, but when I tried to set it to my left upper arm it just stands in place, output is empty. Code:

local pathfindingservice = game:GetService("PathfindingService")
local tweenservice = game:GetService("TweenService")
local Info = TweenInfo.new(
	5,
	Enum.EasingStyle.Sine,
	Enum.EasingDirection.Out,
	-1,
	false,
	0
)
local Manhack = game.Workspace:WaitForChild("Manhack")
local path = pathfindingservice:CreatePath()
local waypoints = path:GetWaypoints()
Manhack.PrimaryPart = Manhack.MeshPart
while wait(5) do
	path:ComputeAsync(Manhack.MeshPart.Position, game.Players:WaitForChild("1AIIHailThanos").Character.LeftUpperArm.Position)
	for i, waypoint in pairs(waypoints) do
		local Goals = {
			Position = waypoint.Position
		}
		local MoveToTween = tweenservice:Create(Manhack.MeshPart, Info, Goals)
		local part = Instance.new("Part")
		part.Position = waypoint.Position
		part.Size = Vector3.new(0.6,0.6,0.6)
		part.Shape = "Ball"
		part.Material = "Neon"
		part.Anchored = true
		part.CanCollide = false
		part.Parent = workspace
		MoveToTween:Play()
	end
end

1 answer

Maybe it doesn't work because it's one of your character parts? Try using a part to simulate your arm and make the original one invisible.

Edit: also your name doesn't have Capital Letters, so game.Players:WaitForChild("1AIIHailThanos") is still waiting. I tested here to be sure and WaitForChild really checks capital letters.

This discussion is preserved as it was. New answers, comments, and votes are closed.