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?!

This is a onclick command i think

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" ------- up till here i believe it creates a textbutton but i dont know what went wrong

textButton.MouseButton1Down:connect(function() 
	game.StarterGui.MainLocalScript.introgui.Background.backgroundTransparency = 1
end)

but it said backgroundTransparency is not a valid member

or

logo is one of the imagelabel and backlogo is another and mainlocalscript is the localscript name

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)

i did this but it says imageTransparency is not a valid member

help? if its possible pls... how do u delete the imagelabel through scripts

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

2 comments

0

Thank you

0

err can i do visible = false?

1 answer

✓ Accepted answer

Very simply, imageTransparcy and backgroundTrasnparency don't exist. Lua (and thus, ROBLOX) is case sensitive. To fix both of those errors, you need to capitalize the first letter: ImageTransparency, BackgroundTransparency; like it appears in the Properties menu.

As for deleting the ImageLabel when you're done with it: use the Destroy method on it.

2 comments

0

err but how sorry im kinda confused D:

0

Confused about what?

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