Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can you help me fix my shop gui? its not opening or closing :(

Hello this code was from alvinblox's video here is the idk what is wrong with it

-- Core UI localscript

local availableTools = game.ReplicatedStorage:WaitForChild("GetTools"):InvokeServer() local mainFrame = .Parent:WaitForChild("MainFrame") local safeArea = mainFrame:WaitForChild("SafeArea") local itemInformation = safeArea:WaitForChild("ItemInformation") local infoFrame = itemInformation.InfoFrame local selectedItem = itemInformation.SelectedItem local equippedItem = itemInformation.EquippedItem local numberOfItems = #availableTools

local itemFrame = safeArea.ItemFrame local shopButton = .Parent:WaitForChild("ShopButton") local buyButton = infoFrame.BuyButton local equippedItemViewport = .Parent:WaitForChild("EquippedItemViewport") local itemViewport = itemInformation.ItemViewport

--[[

[ DO NOT WRITE YOUR CODE IN HERE. WRITE IT AT THE BOTTOM OF THIS . ]

If you want the rest of this code, become a Channel Member by going to https://www.alvinblox.com/join or 
click on the Join Button next to the subscribe button on my YouTube channel.

I spend hours making these  and GUIs and I really appreciate your support - whether you subscribe, like or become members. 

Thanks guys , you rock <3

Alvin

(This is a comment, you can delete it if you wish, but write any of your code below the following line, else it won't work.

--]]

-- WRITE YOUR CODE AFTER THIS LINE, DO NOT PUT IT IN THE COMMENT shopButton.MouseButton1Click:Connect(function() mainFrame.Visible = not mainFrame.Visible end)

1 comment

0

http://idownvotedbecau.se/noattempt (this is not your code)

1 answer

It appears there is a syntax error when assigning mainFrame. Assuming your error is similar to:

expected near '.'

local mainFrame = .Parent:WaitForChild("MainFrame")

Assuming that was meant to be script.Parent, replace that line with:

local mainFrame = script.Parent:WaitForChild("MainFrame")

1 comment

0

umm thx but it's still not workin :(

This discussion is preserved as it was. New answers, comments, and votes are closed.