You can write your topic however you want, but you need to answer these questions:
I want the tweened part NOT to go back to the original position
2.It goes back to original position
wait(1)
local humanoid = script.Parent:WaitForChild('Humanoid')
local humrp = script.Parent:WaitForChild("HumanoidRootPart")
local animator = humanoid:WaitForChild("Animator")
local Animate = Instance.new("Animation")
local bin = true
Animate.AnimationId = "rbxassetid://15251945896"
local AnimateTrack = animator:LoadAnimation(Animate)
------------------------------------------------------------------------------------------------
local TweenService = game:GetService("TweenService")
local info = TweenInfo.new(
1,
Enum.EasingStyle.Sine,
Enum.EasingDirection.InOut,
0,
false,
0
)
local info2 = TweenInfo.new(
4,
Enum.EasingStyle.Cubic,
Enum.EasingDirection.InOut,
0,
false,
0
)
------------------------------------------------------------------------------------------------
workspace:WaitForChild("MoontainPart").Touched:Connect(function()
if bin == true then
bin = false
local Ico = workspace.IcoEnergy.MoontainICO
local goPart = workspace.MoontainGoPart
local newSize = Ico.Size - Vector3.new(2.25,2.5,2.125)
local tween1 = TweenService:Create(Ico, info2, {Position = goPart.Position, Size = newSize})
tween1:Play()
tween1.Completed:Wait()
end
end)
Also don’t worry about the humanoid and animations locals and scrits, thats for the rest of script
wait(1)
local humanoid = script.Parent:WaitForChild('Humanoid')
local humrp = script.Parent:WaitForChild("HumanoidRootPart")
local animator = humanoid:WaitForChild("Animator")
local Animate = Instance.new("Animation")
local bin = true
Animate.AnimationId = "rbxassetid://15251945896"
local AnimateTrack = animator:LoadAnimation(Animate)
------------------------------------------------------------------------------------------------
local TweenService = game:GetService("TweenService")
local info = TweenInfo.new(
1,
Enum.EasingStyle.Sine,
Enum.EasingDirection.InOut,
0,
false,
0
)
local info2 = TweenInfo.new(
4,
Enum.EasingStyle.Cubic,
Enum.EasingDirection.InOut,
0,
false,
0
)
------------------------------------------------------------------------------------------------
workspace:WaitForChild("MoontainPart").Touched:Connect(function()
if bin == true then
bin = false
local Ico = workspace.IcoEnergy.MoontainICO
local goPart = workspace.MoontainGoPart
local newSize = Ico.Size - Vector3.new(2.25,2.5,2.125)
local tween1 = TweenService:Create(Ico, info2, {CFrame = goPart.CFrame, Size = newSize})
tween1:Play()
tween1.Completed:Wait()
end
end)