local elevate = script.Parent
local Floor = game.Workspace.moveto.Position
local tween = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(2.0,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,true,1)
local goal = {Floor}
local tweenAnimation = tween:Create(elevate.Position,tweenInfo, goal)
local function onTouch(otherPart)
local model = otherPart.Parent
if model:IsA("Model") then
local humanoid = model:FindFirstChildWhichIsA("Humanoid")
if humanoid then
tweenAnimation:Play()
end
end
end
elevate.Touched:Connect(onTouch)