So basically I want to make a part fly to the player but if the player is moving because it only gives the current cframe the part will stop to the last location of the player
local touched = false
local count = 0
game.Workspace.Part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
touched = true
end
end)
function callSuit(player)
while touched == false do
wait(0)
count = count + 0.01
game.Workspace.Part.CFrame = game.Workspace.Part.CFrame:Lerp(player,count)
end
touched = false
end
suitEvent.OnServerEvent:Connect(function(player)
callSuit(player.Character.Head.CFrame)
end)
