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

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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

0
Thank you KaiserTheUltimateXD 5 — 8y
0
err can i do visible = false? KaiserTheUltimateXD 5 — 8y

1 answer

Log in to vote
0
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
8 years ago

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.

0
err but how sorry im kinda confused D: KaiserTheUltimateXD 5 — 8y
0
Confused about what? adark 5487 — 8y
Ad

Answer this question