#help me please

65 messages · Page 1 of 1 (latest)

loud marten
#

local button = script.Parent
local blureffect = game.Lighting.Blur

blureffect.Enabled = true
button.MouseButton1Click:Connect(function()
blureffect.Enabled = false
button.Visible = false
end)

pulsar parrot
#

this script assumes that the game has a lighting object with a "Blur" property, and that the button and the lighting object are both in the same place (presumably in the game). If either of these assumptions are not met, the script may not behave as expected.

#

if u would like to elaborate what exactly is the issue u're facing

#

@loud marten

loud marten
#

the issue is

#

i need to make the frame go away to when the trigger button is pressed

#

script.Parent.Parent.TextLabel.Visible = false

#

script.parent.parent

#

etc

#

local button = script.Parent
local blureffect = game.Lighting.Blur

blureffect.Enabled = true
button.MouseButton1Click:Connect(function()
blureffect.Enabled = false
button.Visible = false
end)

#

to that

#

but im not sure how to do it

#

.Instance.Main menu

pulsar parrot
#

To make a frame disappear when a button is pressed, you can use similar logic to what you have provided in your script.

First, you will need to get a reference to the frame that you want to make disappear. You can do this by accessing the parent of the button, and then accessing the parent of that object. If the button and the frame are both in the same hierarchy, this should give you a reference to the frame.
For example:

#
 local frame = script.Parent.Parent
#

Next, you can set the "Visible" property of the frame to "false" when the button is clicked. You can do this by modifying the function connected to the "MouseButton1Click" event of the button

#
local button = script.Parent

button.MouseButton1Click:Connect(function()
    frame.Visible = false
end)
#

This will make the frame invisible when the button is clicked.
You can also add additional logic to the function, such as disabling a blur effect or making the button itself invisible, as shown in your original script

loud marten
#

uhm

#

Im very very new but i think i can understand this

pulsar parrot
#

what exactly u wnt the script to do

#

@loud marten

loud marten
#

Just when the button is pressed hide the button frame and txt

#

Ok it work now do i just do the same thing for txt lable?

pulsar parrot
#

you can set the "Visible" property of the button and the text label to "false" when the button is clicked. You can do this by modifying the function connected to the "MouseButton1Click" event of the button.

#
button.MouseButton1Click:Connect(function()
    button.Visible = false
    textLabel.Visible = false
end)
#

This will make the button and the text label invisible when the button is clicked.

loud marten
#

ok would this work?

spare gustBOT
#

studio** You are now Level 2! **studio

pulsar parrot
#

yes

loud marten
#

this

pulsar parrot
#

copy pste this code here

loud marten
#

ok

loud marten
pulsar parrot
#

send me what u wrote

#

here

loud marten
#

ok

pulsar parrot
#

not the ss

#

but in text form

loud marten
#

local button = script.Parent
local blureffect = game.Lighting.Blur
local frame = script.Parent.Parent

blureffect.Enabled = true
button.MouseButton1Click:Connect(function()
blureffect.Enabled = false
button.Visible = false
frame.Visible = false
end)

#

I removed local textLabel = script.Parent and textLabel.Visible = false

pulsar parrot
#

This script appears to be setting up a button that, when clicked, will disable a blur effect, make the button itself invisible, and make a frame invisible

loud marten
#

yes

pulsar parrot
#

local textLabelParent = script.Parent.Parent
local textLabel = textLabelParent.TextLabel
textLabel.Visible = false

loud marten
#

uhm

#

Okay imma be honest this is my 2nd day learning how to script

#

So im lost as shit

#

Can you just add the script accordingly to this

#

local button = script.Parent
local blureffect = game.Lighting.Blur
local frame = script.Parent.Parent

blureffect.Enabled = true
button.MouseButton1Click:Connect(function()
blureffect.Enabled = false
button.Visible = false
frame.Visible = false
end)

pulsar parrot
#

local button = script.Parent
local blureffect = game.Lighting.Blur
local frame = script.Parent.Parent
local textLabel = frame.Parent.TextLabel
button.MouseButton1Click:Connect(function()
blureffect.Enabled = false
button.Visible = false
frame.Visible = false
textLabel.Visible = false
end)

#

This will make the text label invisible when the button is clicked, along with the button and the frame.

loud marten
#

ok

#

thank you

#

You truley are the rizz lord

#

Thank you you dont know how much time i have spent on that simple ass probleme you solved in 10 seconds then spent 100 years explaining to me

#

🙂

pulsar parrot
#

np!

loud marten
#

@pulsar parrot

#

how important are functions

pulsar parrot
#

In Roblox Studio, functions are a fundamental concept that allows you to organize and structure your code