In the page of the tweenposition and size in the developer hub there is a a parameter that is called time. You should put a 1 after the ‘Sine’. If you want to make even faster you can lower it to 0.5. You can look in the developer hub right here: GuiObject | Roblox Creator Documentation
local tween = script.Parent.Parent.DayNightButton
script.Parent.MouseButton1Click:Connect(function()
if tween.Position == UDim2.new(0.087, 0,0.184, 0) then
tween:TweenPosition(UDim2.new(0.067, 0,0.184, 0),"Out","Sine", 1)
else
tween:TweenPosition(UDim2.new(0.087, 0,0.184, 0),"In","Sine", 1)
end
end)