So I've been trying to make a shop Gui for quite some time now and while I could easily have it just turn the visible on and off, I like to be fancy and use tweening. Unfortunately whenever I do it makes the shop Gui invisible. To go more in-depth is when I click the button to open the shop, if I select the frame I can see the tween animation happen and see that its where its supposed to be, but I just can't see it physically. It's hard to explain but it does the tween animation and it goes where it's supposed to but its invisible.
Yes I have it set on to be visible and everything but it still is invisible, so some professional help would be nice given I've only been scripting for 3 days.
local frame = game.StarterGui.Shop.Frame local open = game.StarterGui.Shop.Open local background = game.StarterGui.Shop.Background script.Parent.MouseButton1Click:Connect(function() if open.Value == false then open.Value = true frame:TweenPosition(UDim2.new(0.213, 0, 0.17, 0), "Out", 1, true) background.Visible = true else open.Value = false frame:TweenPosition(UDim2.new(0.213, 0, 1, 0), "Out", 1, true) background.Visible = false end end)
https://imgur.com/a/eBROUlu shows the outline on screen
https://imgur.com/a/WHpZFT9 shows it off screen
Another thing i see A lot of Beginner Gui scripters do.. Use StarterGui
instead of PlayerGui
PlayerGui
located in game.Players.PLAYERNAME.PlayerGui
game.StarterGui...
say game.Players.LocalPLayer.PlayerGui
Use this instead:
local player = game.Players.LocalPlayer local playerGui = player.PlayerGui local frame = playerGui.Shop.Frame local open = playerGui.Shop.Open local background = playerGui.Shop.Background