Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I fix this tween error where it always goes to the top left, not the set position?

I am quite new to scripting an i've just tried to make a tween script. It works but it never goes to the set position, it just goes to the top left of the screen. Anyone know how to fix this?

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.Shop:TweenPosition(UDim2.new({{0.384, 0},{0.268, 0}}),"In","Sine",1)
end)

1 answer

✓ Accepted answer

Your position is written wrong. Write the Udim2 with just the numbers, not the copy and pasted property from the properties area.

Here is your fixed script.

script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Shop:TweenPosition(UDim2.new(0.384,0,0.268,0),"In","Sine",1)	
end) 

Have fun scripting!

1 comment

0

Thank you !

This discussion is preserved as it was. New answers, comments, and votes are closed.