First, write script.Parent if the script is directly beneath the part you want to
code. If not, write where the part you want to script is located eg. Game.Workspace.Part
Thats's all!
Here's an example:
script.Parent.Transparency = 0.5
local lowrange = 1
local maxrange = 10
local ranges = [lowrange, maxrange]
for number=1, maxrange do
print(number)
wait()
end