function ChangeBase(brick) brick.Transparency = 0.5 end ChangeBase(Base)
-I don't have a part named 'brick' inside workspace, but I have a brick named 'Base' inside workspace
OUTPUT: Workspace.Script:2: attempt to index local 'brick' (a nil value) 13:03:11.924 - Script 'Workspace.Script', Line 2 - global ChangeBase 13:03:11.924 - Script 'Workspace.Script', Line 5 13:03:11.925 - stack end
Your problem is you're trying to use Base
but roblox doesn't know what it is. How would they know?
You need to work with objects roblox does know, and work your way towards Base
.
Luckily, Workspace
is predefined in all scripts! To fix your error, just put Workspace.Base
where Base
is!
ChangeBase(Workspace.Base)