✓ Accepted answer
It would help if you looked at, and provided, your errors in the console.
Transparency for beams in roblox is a number sequence, rather than a number. This makes it a bit trickier to modify, as whole numbers (As much as I wish roblox made them...) won't naturally convert over to the proper Number Sequence value.
Instead of turning the transparency to 0, if you are simply trying to turn the beam from invisible to visible, try turning it's Enabled property from False to True instead. This will make it pop on.
script.Parent.Beam.Enabled = true
If you needed it to be a different transparency at the start, rather than off, you're going to have to look into number sequences.
https://developer.roblox.com/en-us/api-reference/datatype/NumberSequence
I honestly wish, since Beams appear as though they use a basic number, that roblox could naturally convert a number into a simple Number Sequence by itself, but that is sadly not how it works currently.
Hope I could help.
8 comments
Well, this is a messy way to do it, but as far as I can tell, this should work. I would check your hierarchy; did you get the correct location of everything?
Really does look like you might've gotten your hierarchy wrong
The website didn't load the script correctly, theres an indent between function and wait, and an indent between 0 and end.
The beam is inside a part and the script is also inside the part
Also, just like programming, the website did what you told it to do. In order to get it to display properly here, you need to put your code in a code block.
Is the beam a part?
It's clearly just an actual beam, not a part. He likely simply didn't expect he would need to use a Number Sequence - which to be fair, it is quite stupid you have to for simple transparency values.
It is not "clearly" an actual beam because he never specified what exactly the beam was and both parts and beams have a transparency value.