so ive got a tween im doing and it works fine until i add an XP bar to the script
let me explain where things are, ive got 2 ScreenGui within StarterGui 1 names "HUD" and 1 named "XPBar"
this script is placed under "HUD" within an ImageButtoncalled Left
so when i try to add "Frame" which is under "XPBAR" the tween button stops working all together, im pretty noob at lua so im sure im just doing it wrong....here is my script
Bar = script.Parent.Parent.Frame --Placed in HUD
Hotbar = script.Parent.Parent.HotBar --Placed in HUD
Left = script.Parent --Placed in HUD
Right = script.Parent.Parent.Right --Placed in HUD
Xp = script.Parent.Parent.Parent.XPBar.Frame --Placed in XPBar. Probably did this part wrong :P Shaddup im learning :C
Open=true
function RunGui()
if Open then
Bar : TweenPosition(UDim2.new(0, -30, 0, 0) + Bar.Position)
Hotbar : TweenPosition(UDim2.new(0, -30, 0, 0) + Hotbar.Position)
Left : TweenPosition(UDim2.new(0, -30, 0, 0) + Left.Position)
Right : TweenPosition(UDim2.new(0, -30, 0, 0) + Right.Position)
Xp : TweenPosition(UDim2.new(0, -30, 0, 0) + Xp.Position)
end
end
script.Parent.MouseButton1Down:connect(RunGui)
