game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == ":open" then game.Part.Transparency = 1 game.Part.CanCollide = false elseif msg == ":close" then game.Part.Transparency = 0 game.Part.CanCollide = true end end) end)
There is only one object called Part
in the workspace.
game.Part
Part
isn't a child of game
. I think you mean
game.Workspace.Part
In Lua, you always go from broad to specific. You can't go directly from very broad to very specific, you must put the complete path to the object, starting at the broadest possible (game
) and getting more and more specific until you find Part
.
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg :find( ":Open":lower() ) then -- hi this is bob OH yea I forgot :open *script finds the executes* game.Workspace.Part.Transparency = 1 game.WorkspacePart.CanCollide = false elseif msg:find( ":Close":lower() ) then game.Workspace.Part.Transparency = 0 game.Workspace.Part.CanCollide = true end end) end)
" and 1=1