Scripting Tutorial #2 - local Variables

Welcome back to another Scripting Tutorial!

Today I will show you how to use the local variable.

It can be used for many things, such as looking for an object (script or part), strings (text or numbers) or math!

Example:

Make a new Script in ServerScriptService or Workspace
Enter the below code:

local Baseplate = game.Workspace.Baseplate

function SetTransparency(part,transparency) -- We will cover functions in another post!
part.Transparency = transparency
end

SetTransparency(Baseplate,0.5)

Play Solo, if the baseplate is semi-transparent, well done! You have successfully used the local variable in a script!

See you in Tutorial #3!

3 Likes

Is there a problem with teaching people how to script?

1 Like

No

1 Like

:man_shrugging:

1 Like