So ive got a tween and im using the same thing for an inventory button that moves it and it works fine with multiple objects tweening at once
so ive got this that works
wait(1)
Invy = script.Parent.Parent.InvenButton
Open=true
function RunGui()
if Open then
Invy : TweenPosition(UDim2.new(.25, 0, .25, 0))
end
end
script.Parent.MouseButton1Down:connect(RunGui)
that moves my inventory button only
but when i add these lines
BookOpen = script.Parent.Parent.Parent.ShopGui.Open
--and this line
BookOpen : TweenPosition(UDim2.new(.25, 0, .25, 0))
and turn the script into this
wait(1)
Invy = script.Parent.Parent.InvenButton
BookOpen = script.Parent.Parent.Parent.ShopGui.Open --Added line
Open=true
function RunGui()
if Open then
Invy : TweenPosition(UDim2.new(.25, 0, .25, 0))
BookOpen : TweenPosition(UDim2.new(.25, 0, .25, 0)) --Added line
end
end
script.Parent.MouseButton1Down:connect(RunGui)
the tween wont work when i click the button....so im guessing the problem is the BookOpen
BookOpen in under my StarterGui.ShopGui and its called Open, idk if i did it wrong or if i forgot to add something because its so far from the script....idk im a big noob at Lua so please any help on guiding me to a solution is welcome :)
