just put :TweenPosition(Udim.new(new position), "Out", "Sine", .2, true) when equipped instead of enabling it
and putTweenPosition(Udim.new(old position), "Out", "Sine", .2, true) when unequipped instead of enabling it
Instead, you should try using TweenService. Using TweenService allows you to disconnect a tween track in case it’s still playing when you equip the tool again.
local sp = script.Parent --USING A VARIABLE FOR SCRIPT.PARENT SAVES ON SO MUCH WRITING
local open
local close
local TS = game:GetService("TweenService")
local Info = TweenInfo.new(0.5,Enum.EasingStyle.Sine,Enum.EasingStyle.In)
tool.Equipped:Connect(function()
if close then close:Cancel() end
open = TS:Create(yourFrame,Info,{Position = UDim2.new(yourPosition)})
open:Play()
end)
tool.Unequipped:Connect(function()
if open then open:Cancel() end
close = TS:Create(yourFrame,Info,{Position = UDim2.new(yourPosition)})
close:Play()
end)
Doing this for UIs will make them feel more responsive too!