What is wrong with my UI Script?

Hi there, I am currently developing a game, but I can’t seen to see what is wrong with the script I have produced, here it is.

local Inventory = script.Parent.Inventory
local OpenInventory = script.Parent.OpenInventory

OpenInventory.MouseButton1Up:Connect (function()

Inventory:TweenPosition(
	UDim2.new(0.324, 0,0.192, 0)
	"Out", 
	"Quad", 
	3, 
	false, 
	)

end)

If you can help please do.
Thank you for your time. :slight_smile:

Could you show me the explorer tab?

Sure, I can but I need a second but could.

You put a comma after false, just remove it.

And you didn’t put a comma after the udim2 position.

Um

image

I swear I’m not blind but does that say “Open nventory”

2 Likes

So, this should work:

Inventory:TweenPosition(
	UDim2.new(0.324, 0,0.192, 0),
	Enum.EasingDirection.Out,
	Enum.EasingStyle.Quad, 
	3, 
	false
	)

oh, i see. Try to use this script

local Inventory = script.Parent.Inventory
local OpenInventory = script.Parent["Open nventory"]

OpenInventory.MouseButton1Click:Connect(function()
	Inventory:TweenPosition(	
		UDim2.new(0.324, 0, 0.192, 0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Quad, 
		3, 
		false
	)
end)

Hmm, it doesn’t seen to have worked

That seems to have worked thank you!

2 Likes

Literally took 5 minutes to notice this, but please do mark the post that helped you the most as a solution, it’s there for a reason :wink:

3 Likes

Looks fine, could u show the entire script?

1 Like