Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

1 comment

0

Btw err admins how you make the format btr? like 1 statement 2nd and... yea how? help

1 answer

✓ Accepted answer

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)

15 comments

0

thx

0

errr but sir how do you make the background of the textbutton not visible?

0

it doesnt work i guess nothing happens D:

0

Well, you do; textbutton.Visible=false

0

thanks

0

errr but nothing happens D:

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.

0

sure thing sir

0

i hope this is accessible to you it isnt shared to public so... the link is from google docs... hope it is ok

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.

0

thx if theres anything wrong i wld tell u thx

0

THANK U SIR

0

but errr frstz i hope u are seeing this but the textbutton is rly big how to make it smaller?

0

nvm i figured it out thx tho

This discussion is preserved as it was. New answers, comments, and votes are closed.