So Im Making a Script That Moves The Platform, Only Problem Is, Is That Humanoids Are Not Sticking On The Platform
this is the Script
moveDelay = 10
hideDestinationBlocks = true
local TweenService = game:GetService("TweenService")
local mainFolder = script.Parent
local destinationList = {}
for index, value in pairs(mainFolder:GetChildren()) do
local valueName = value.Name
if string.match(valueName, "Destination ") then
table.insert(destinationList, valueName)
end
end
local sortedList = {}
repeat
local lowestValue = {nil, math.huge}
for index, value in pairs(destinationList) do
local nameSplit = string.split(destinationList[index], " ")
local stringToNumber = tonumber(nameSplit[2])
if stringToNumber < lowestValue[2] then
lowestValue = {index, stringToNumber}
end
end
table.insert(sortedList, destinationList[lowestValue[1]])
destinationList[lowestValue[1]] = "Destination 123456"
until #sortedList == #destinationList
if hideDestinationBlocks == true then
for index, value in pairs(sortedList) do
local destinationBlock = mainFolder:FindFirstChild(sortedList[index])
destinationBlock:ClearAllChildren()
destinationBlock.Transparency = 1
end
end
while true do
for index, value in pairs(sortedList) do
local destinationBlock = mainFolder:FindFirstChild(sortedList[index])
TweenService:Create(script.Parent.Platform,TweenInfo.new(moveDelay,Enum.EasingStyle.Linear,Enum.EasingDirection.Out),{Position = Vector3.new(destinationBlock.Position.X,destinationBlock.Position.Y,destinationBlock.Position.Z)}):Play()
wait(moveDelay)
end
end