I need help doing this

Hey, I couldn’t think of what to name the topic, I am making a spinner, and here’s the problem watch the video:
robloxapp-20201003-0553444.wmv (310.0 KB)
It goes through the frame but doesn’t come back from the opposite direction, I need help with this! Thank you.

Hello, I found a very useful article, so I’ll just link it, which you might find very helpful and will probably fit the best for your case:

This will explain you step-by-step how to create a perfectly functional spinning GUI, along with rewarding the player and creating chances of an item’s rarity to be found.
Of course, you’ll have to change a couple of things, like the items’ names and the items’ images IDs.
The tutorial is over a year old, so if something is outdated, just look on the DevsHub to check the newer code/method.
Good luck!

Thanks very much my friend!!:smiley:

1 Like

It will be much more better to find what is causing it if you post your code related to the spinner.

2 Likes

Yes, I will post my code here:

local Spinner = script.Parent;

local Holder = Spinner.Parent.Main.Holder;

local ts = game:GetService("TweenService")

local function spin()
    print("got")
    local StartX = Holder.AbsolutePosition.X + Holder.AbsoluteSize.X/2;
    local endX =  Holder.Crate20.AbsolutePosition.X + Holder.Crate20.AbsoluteSize.X/2
    local landPos = UDim2.new(0, endX - StartX, 0, 0)
    local Xdiff = Holder.Position - landPos
    local t = ts:Create(Holder, TweenInfo.new(4, Enum.EasingStyle.Quart, Enum.EasingDirection.In, 0, false, 0), {Position = -Xdiff})
    t:Play()
    t.Completed:Connect(function()
        print('Completed!!')
    end)
end

Spinner.MouseButton1Click:Connect(spin);