Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Need help with image n background transparency and destroy command pls help?!

Asked by 8 years ago

so.. i tried this

textButton.MouseButton1Down:connect(function() game.StarterGui.MainlocalScript.introgui.Background.logo.ImageTransparency = 1 game.StarterGui.MainlocalScript.introgui.Background.backlogo.ImageTransparency = 1 end)

just changed the bottom part but err nothing happened D: can someone guide me? what did i done wrong? pls bare with me im new to scripting

-------------------------------------------------------------------------------------------------------------------------------------the full one is like this:

local screenGui = Instance.new("ScreenGui") screenGui.Parent = script.Parent

local textButton = Instance.new("TextButton") textButton.Parent = screenGui textButton.Position = UDim2.new(0, 15, 0, 300) textButton.Size = UDim2.new(0, 200, 0, 50) textButton.TextColor3 = BrickColor.White().Color textButton.Style = 2 textButton.Text = "Load Game"

textButton.MouseButton1Down:connect(function() game.StarterGui.MainlocalScript.introgui.Background.logo.ImageTransparency = 1 game.StarterGui.MainlocalScript.introgui.Background.backlogo.ImageTransparency = 1 end)

the script is to make a textbutton named: 'Load Game' and its suppose to make the imagelabels blocking the screen to be transparent but i dont know how to make the image and the textbutton destroyed when i press the load game text button D: hope you guys will be patient with me i just started to get a hang of scripting sorry

0
Btw err admins how you make the format btr? like 1 statement 2nd and... yea how? help KaiserTheUltimateXD 5 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

I'm hoping this fixes things. There are basic error fixes. Let me know if something is not working.

local screengui             =Instance.new('ScreenGui',script.Parent)
local textbutton            =Instance.new('TextButton',screengui)

textbutton.Position=UDim2.new(0,15,0,300)
textbutton.Size=UDim2.new(0,200,50)
textbutton.TextColor3=Color3.new(255,255,255) --white
textbutton.Style=Enum.ButtonStyle.Custom --you can change this to RobloxButton, RobloxButtonDefault, RobloxRoundButton, RobloxRoundDefaultButton, or RobloxRoundDropdownButton
textbutton.Text='Load Game'

textbutton.MouseButton1Down:connect(function()
    script.Parent:remove()
end)
0
thx KaiserTheUltimateXD 5 — 8y
0
errr but sir how do you make the background of the textbutton not visible? KaiserTheUltimateXD 5 — 8y
0
it doesnt work i guess nothing happens D: KaiserTheUltimateXD 5 — 8y
0
Well, you do; textbutton.Visible=false SimplyRekt 413 — 8y
View all comments (11 more)
0
thanks KaiserTheUltimateXD 5 — 8y
0
errr but nothing happens D: KaiserTheUltimateXD 5 — 8y
0
I can't really help you because I don't see what is going on. Maybe make a video/screenshots. And tell me the error in the output if there are any. SimplyRekt 413 — 8y
0
sure thing sir KaiserTheUltimateXD 5 — 8y
0
i hope this is accessible to you it isnt shared to public so... the link is from google docs... hope it is ok KaiserTheUltimateXD 5 — 8y
0
I edited to make the script to make the whole gui get removed after the button is clicked. I'm assuming this is what you wanted to do. SimplyRekt 413 — 8y
0
thx if theres anything wrong i wld tell u thx KaiserTheUltimateXD 5 — 8y
0
THANK U SIR KaiserTheUltimateXD 5 — 8y
0
but errr frstz i hope u are seeing this but the textbutton is rly big how to make it smaller? KaiserTheUltimateXD 5 — 8y
0
nvm i figured it out thx tho KaiserTheUltimateXD 5 — 8y
Ad

Answer this question