Tweening Doesn't Work

I don’t really know how to explain this but I was tweening a bunch of labels to display the auras in my RNG game but for some reason one of those labels isn’t tweening.


The code for the tweening:

local TweenService = game:GetService("TweenService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local showRollsResultEvent = ReplicatedStorage:WaitForChild("ShowRollsResult")

local effectsDisplay = script.Parent.EffectsDisplay
local currentlyDisplayed = script.Parent.CurrentlyDisplayed

local targetPosition = UDim2.new(0.5,0,0.45,0)
local rollTweenInfo = TweenInfo.new(
	0.25,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.In,
	0,
	false
)

local function showRollsResult(rollsResult)
	
	for i, effect in ipairs(rollsResult) do
		local clonedDisplay = effectsDisplay:WaitForChild(rollsResult[i]):Clone()
		clonedDisplay.Parent = currentlyDisplayed
		local tween = TweenService:Create(clonedDisplay, rollTweenInfo, {Position = targetPosition})
		clonedDisplay.Visible = true
		tween:Play()
		tween.Completed:Wait()
		if i ~= #rollsResult then
			clonedDisplay:Destroy()
		else
			task.wait(2)
			clonedDisplay:Destroy()
		end
	end
end

showRollsResultEvent.OnClientEvent:Connect(showRollsResult)

If you need any more information I’m online.

Thank you,
Antlers

If you’re cloning text from one place to another, maybe the one that isn’t tweening isn’t parented to the right place?

1 Like

I found the issue, it was visible while all the labels werent :unamused: sorry for my stupidity, but thank you for your time!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.