I wrote this code and only the transparency changes material doesn't. Can you please tell me why it isn't? Or what should I do to make it work?
game.Players.PlayerAdded:connect(function(player)
if player.Name == "Player1" then
player.Chatted:connect(function(msg)
if msg == "Test" then
game.Workspace.Glass.Transparency = 0
game.Worksapce.NanosStuff.Glass.Material = 1056
elseif msg == "Test2" then
game.Workspace.Glass.Transparency = 0.6
game.Worksapce.Glass.Material = 288
end
end)
end
end)

2 comments
You can also just do: Part.Material = "Grass"
True, but that doesn't work on if statements for some reason