im trying to make a donation button and i want to make it so it opens a big donation frame i typed out the script and it has no errors and i see not errors related to the script in the console
this is the script:
is there any thing wrong with it? because it does not work i even have the proper layout
uhi_o
(HAT3UBERALLES)
November 28, 2020, 3:23pm
#2
Where is the script located? Your image is a little blurry, mind sending it by text instead?
here you go:
local dbutton = script.Parent
local mainDframe = script.Parent.Parent
dbutton.MouseButton1Up:Connect(function()
mainDframe.Visible = true
end)
--end of script
and here is where the script is located (idk how to show it without a screenshot sorry if its blurry)
and when im playing it i set the donation background visibility unchecked
uhi_o
(HAT3UBERALLES)
November 28, 2020, 3:27pm
#4
MouseButton1Up fires when the user stops clicking with their mouse. Instead use MouseButton1Down.
local dbutton = script.Parent
local mainDframe = script.Parent.Parent
dbutton.MouseButton1Down:Connect(function()
mainDframe.Visible = true
end)
Edit: The gui is not even visible for the button to be visible…
1 Like
SiebeYolo
(Siebe)
November 28, 2020, 3:28pm
#5
Why don’t you use dbutton.MouseButton1Click:Connect(function() instead?
i tried MouseButton1Down @SiebeYolo said MouseButton1Click i did that and they are not working for me
uhi_o
(HAT3UBERALLES)
November 28, 2020, 3:41pm
#7
Place the Button elsewhere in the ScreenGui just not inside the Frame that will change it’s Visible property also remember to reference properly when that is done.
1 Like
Have you checked the variables you’ve set. I’m assuming you placed the script inside the Donation Button.
And based on the image you’ve given wouldn’t the main Frame be.
this
local mainFrame = script.Parent.Parent.donationmaineFrame
instead of
lcoal mainFrame = script.Parent.Parent
Sorry If I’m wrong.
1 Like
i tried that but i also wrote
print(“working”) in the function too, to see if the function works i pressed the button and it did not print it out
This is the layout
Here’s the Output
Here’s my Code
I tested it and the Frame became visible.
Have you checked your variables, and the location of the different UI elements ?
will try that out, right now im kind of tired cause i just finished the UI on my other game
1 Like
i solved it myself the scripts were broken so i deleted them and did it again
still thank you for helping me
1 Like