Heya guys, im a brand new scripter and i wanted to try to code a simple door. Here is my code:
local part = game.Workspace.Part
function OnTouched()
part.Transparency = 0.5
part.CanCollide = false
wait(1.8)
part.Transparency = 1
part.CanCollide = true
end
For whatever reason, whenever i touch the part, (It is named Part in the workspace) nothing happens, why is this?

2 comments
Thanks! It makes so much sense now!
you're welcome c: