Hey.
So, i have a script in PlayerGui which when you press on a button a imagelabel with a circle image starts rotating with tweenservice at a speed of 0.25 to 360 qnd set the 360 rotation back to 0 (in a loop for 10 times) after this i roll it one more time to a specific value but the problem is that when the spinning is done the circle is an oval shape.
I am not sure how anyone can help here; can we see your code?
I am not sure but you can try to make the label height = the label width?
ruletaHud.SpinButton.Activated:Connect(function()
exitButtonHud.Enabled = false
if inRoll then
return 0;
end
inRoll = true
for i = 1, 10 do
local tweeninfo = TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0)
local objective = {
Rotation = 360
}
local tween = tweenservice:Create(ruletaHud.Ruleta, tweeninfo, objective)
tween:Play()
tween.Completed:Wait()
ruletaHud.Ruleta.Rotation = 0
end
local random_location = math.random(prizeLocations[random_number][1]+0.1, prizeLocations[random_number][2]-0.1)
local tweeninfo = TweenInfo.new(0.25*(random_location/360), Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0)
local objective = {
Rotation = random_location
}
local tween = tweenservice:Create(ruletaHud.Ruleta, tweeninfo, objective)
tween:Play()
tween.Completed:Wait()
wait(1.0)
if prizes[randomized_prizes[random_number]].Type == PrizeType.Coin then
game.ReplicatedStorage.Events.AddCoins:FireServer(player, prizes[randomized_prizes[random_number]][itemRarityName])
elseif prizes[randomized_prizes[random_number]].Type == PrizeType.Crate then
local crateName = game.ReplicatedStorage.Items[category].Crates[getCrateNameById(prizes[randomized_prizes[random_number]].CrateType)].ItemName.Value
local crate = game.ReplicatedStorage.Inventory.Crates[category]:FindFirstChilde(crateName)
if crate then
crate.Value += 1
else
crate = Instance.new("IntValue", game.ReplicatedStorage.Inventory.Crates[category])
crate.Value = 1
crate.Name = crateName
end
end
wait(2.0)
ruletaHud.Enabled = false
inRoll = false
end)
Sure, i’ll try that
1 Like