|
tele = game:GetService("TeleportService")
frame = script.Parent.Parent.Frame
open = false
inShop = false
player = script.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Down:connect(function()
print(inShop)
print(open)
if open == false and inShop == false then
open = true
frame:TweenPosition(UDim2.new(0, 50, 0.5, -100), "Out", "Linear", 0.5, true) -- This here isn't working for some reason.
elseif open == true and inShop == false then
open = false
frame:TweenPosition(UDim2.new(0, -260, 0.5, -100), "Out", "Linear", 0.5, true)
elseif inShop == true then
script.Parent.Parent.Shop:TweenPosition(UDim2.new(1, 175, 0.5, 0), "Out", "Linear", 0.5, true)
inShop = false
open = false
end
end)
script.Parent.Parent.Shop.DescFrame.CloseButton.MouseButton1Down:connect(function()
script.Parent.Parent.Shop:TweenPosition(UDim2.new(1, 175, 0.5, 0), "Out", "Linear", 0.5, true)
frame:TweenPosition(UDim2.new(0, 50, 0.5, -100), "Out", "Linear", 0.5, true)
inShop = false
open = true
end)
script.Parent.Parent.Frame.Shop.MouseButton1Down:connect(function()
if inShop == false then
inShop = true
script.Parent.Parent.Shop:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "Out", "Linear", 0.5, true)
frame:TweenPosition(UDim2.new(0, -260, 0.5, -100), "Out", "Linear", 0.5, true)
end
end)
It works in studio but not in online, and it's a normal script.
What it's supposed to do is open a gui by tweening it. |