Hello. So I have this MouseButton1Click function and when it occurs, it makes the gui visible and plays a tween animation. Here is the script:
script.Parent.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
local gui1 = player.PlayerGui.Shop.Frame1
local gui2 = player.PlayerGui.Shop.Frame
local gui3 = player.PlayerGui.Shop.Shop
local gui4 = player.PlayerGui.Shop.Back
print(gui1.Name)
gui1.Visible = true
gui2.Visible = true
gui3.Visible = true
gui4.Visible = true
gui1:TweenPosition(UDim2.new0(0.439, 0,0.152, 0), "Out","Bounce",1)
gui2:TweenPosition(UDim2.new0(0.435, 0,0.142, 0), "Out","Bounce",1)
gui3:TweenPosition(UDim2.new0(0.293, 0,0.195, 0), "Out","Bounce",1)
gui4:TweenPosition(UDim2.new0(0.289, 0,0.185, 0), "Out","Bounce",1)
end)
The problem is, I am getting this error on the TweenPosition lines:
The script identifies gui1, 2, 3, and 4 and it makes them visible but it isn’t playing the animation. How do I fix this? Thanks!