Help with tweening a position

Hello everyone,

I am new to scripting on Roblox and was just wondering if anyone could help me with this script I’m having issues with, it’s a tween script that basically changes the position of a frame.

I think I’ve set it up correctly but it doesn’t do anything and it doesn’t seem to let me know of any errors in my Console. Please could someone assist me with this?

Here is my script
local MainUI = script.Parent.MainUI
local MainFrame = MainUI.MainFrame
local TS = game:GetService("TweenService")

local PositionTween = TweenInfo.new(
		1, -- Time
		Enum.EasingStyle.Quint, -- EasingStyle
		Enum.EasingDirection.InOut, -- EasingDirection
		0, -- Repeat Count
		false, -- Reverses
		0 -- Delay Time
	)

TS:Create(MainUI.MainFrame, PositionTween, {Position = UDim2.new(0.28, 0,0.31, 0)}):Play()

Sorry for the messy code, I don’t understand what I’ve done wrong, I also tried using Tween Position, I have read multiple forums but nothing seems to be working.

Thank you.

Hello! I’ve just tried the same exact script you pasted here (Just with more time on the tween) and it seems to work completly fine for me, can you give us an idea or a screenshot of what your explorer looks like where that frame is placed?

I managed to fix the issue! Turns out it was

game.Players.PlayerAdded 

that was breaking the script. I’ve fixed it now, thanks for your help!

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