So I’m trying to script again, this time just trying to make a simple Inventory Gui. Basically I want it so that when you click the inventory button, it makes an inventory GUI wich will contain items you collect appear below the button. Like I said in my last post I’m not very good at scripting and ma most likely doing something wrong. Here is what I have so far, although an error is popping up and I’m not sure how to fix it or where to go from here.
local button = script.Parent
local toggled = false
local GUI test = GUI test
local invenimage = GUI test.Parent
local function onButtonActivated()
if toggled == true then
invenimage = visible
You can’t call “Visible” directly, it’s a properties of the object, so you call it like any other edit : invenimage.Visible = true/false
Also, i’m not sure what you’re trying to do here, but to make a path, you’ll have to add a dot for Descending or “.Parent” to Ascend in the explorer via the script. btw the variable cannot have a space so you’d do this
Oh ok, thanks. Also I must have missed that, I think I was tryong to fix issues and accidently ended up putting “GUI test = GUI test” (Don’t question how I did that on accident.)
Oh ok, I thought it automatically did that and was confused why it wasn’t doing it for the script I posted. @xRuinedSeven That didn’t seem to work, I assume I’m supposed to chang something in the script to make it fit my situation? If so what do I change?
Ok thanks. I think I may have jumped into things a little too, although I started developing a game before having like a huge amount of knowledge, and I kinda wanna be able to release an early version of it soon. Probably would have been better off learning more before jumping into development.
Ok so I’ve updated the script, still not working although I think I’m getting closer.
Here is what my GUI’s look like:
I think it’s entirely possible I’ve made a mistake in those.
Here is my script:
local InvenFrame = script.Parent.ToggleButton
local Inventory = script.Parent.InvenFrame
InvenFrame.MouseButton1Click:Connect(function()
if Inventory.Visible == true then
Inventory.Visible = false
else
Inventory.Visible = true
end
end)
You probably meant you gave up before, and not the fact you used to know how to code, You’ll be in better hands to just follow a actual tutorial that explains the logics behind setting up Variables and editing properties within a minute. so i hope you’ll do the following after you resolved this Inventory UI
Exactly, variables are where you define what you want to use in your code so you don’t have to keep typing those lines out every time you want to get it.
Ok thanks, I’ll probably do that but like you said I should figure this situation out first. @xRuinedSeven Thanks, I’ll see if it works, and if it does you’re my favorite person for the day.
EDIT: Hooray! It does work! Thanks!