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

How to Change Transparency using a script?..my method dont work.......

this didnt work..

script.Parent.Transparency=0.9

2 answers

✓ Accepted answer

You should separate the 'script.Parent.Transparency', '=' and '0.9' with spaces, like this:

script.Parent.Transparency=0.9

Ensure the code is a script inside a block (not inside a folder of a block or else) and that the script is a Script, not LocalScript. In the case it is a LocalScript, you will need to put it somewhere where it does run, like it is

StarterPlayer>StarterPlayerScripts

And indicate full address of the block.

local address = nil -- (Change nil to your block's address)

address.Transparency = 0.9

As to keep things easy, just make sure it is a script, not local inside a block with the following code:

script.Parent.Transparency=0.9

Hope it helped!

2 comments

0

Nice to know it worked :3

1

Whitespace does not matter in Lua.

script.Parent.Transparency = 0.9

Literally just that.

or...

loc = (number)
#This number can be changed

script.Parent.Transparency = loc

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