#help me please
65 messages · Page 1 of 1 (latest)
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
no this part works and there is a blur
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
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
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?
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.
ok would this work?
** You are now Level 2! **
yes
copy pste this code here
ok
what code
ok
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
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
yes
this one has an error
local textLabelParent = script.Parent.Parent
local textLabel = textLabelParent.TextLabel
textLabel.Visible = false
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)
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.
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
🙂
np!
In Roblox Studio, functions are a fundamental concept that allows you to organize and structure your code