Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

LocalTransparency not LocalTransparencyModifier? Is it a thing?

Asked by
Hexcede 52
9 years ago

I know there is BasePart.LocalTransparencyModifier, but what if I wanted to set the local transparency of a model? For example x-ray vision could be created locally where every part to a person holding a tool is 0.01 transparency. You could make thermal vision too.

-- Do you think that I would just call this randomly? Of course I created the part in the workspace ;)
workspace.Part.LocalTransparencyModifier = 1 -- Would still be 0 as it multiplies for local. Also this is a thing: http://wiki.roblox.com/index.php?title=API:Class/BasePart/LocalTransparencyModifier

Am I just reading this wrong? Does it truely work that way? Please help!

2 answers

Log in to vote
0
Answered by 9 years ago

--First hand, there are many basic errors. To specify a Part, you need to add "game" to it (game.Workspace.Part) . The major thing is that, according to the wiki there is no LocalTransparencyModifier Property of a part. -------------> http://wiki.roblox.com/index.php?title=API:Class/Part --Second of all, all properties of a part cannot be edited on the client - side (at least I think so).

0
Actually there is, it's just hidden, http://wiki.roblox.com/index.php?title=API:Class/BasePart/LocalTransparencyModifier and parts are stored on the server and sent to the client, so modification by a script would be possible but maybe not because of security. Another thing you can call Instance.new("Part", workspace instead of game.Workspace, it's shorter and there for a reason) Hexcede 52 — 9y
0
Not only that but the roblox control scripts literally have it in them in the starterscripts service Hexcede 52 — 9y
Ad
Log in to vote
0
Answered by
Hexcede 52
9 years ago

Yes it is! It works perfectly the way I want it to. LocalTransparency modifier modifies opacity not transparency directly. Hooray I can do what I wanted to!

workspace.Baseplate.LocalTransparencyModifier = 0.01 -- Makes baseplate render objects through it.

Answer this question