I have been trying to figure out how to make a wall that when you chat wallon it turns the wall can collide to true and transparency to 0 I got some of it figured out but I want it to work in a certain group at a certain rank. Heres the code I got so far.
local wall = game.Workspace:WaitForChild "Wall"
local players = game:GetService "Players"
function chatted(msg)
if string.lower(msg) == "wallon" then
wall.Transparency = 0
wall.CanCollide = true
elseif string.lower(msg) == "walloff" then
wall.Transparency = 1
wall.CanCollide = false
end
end
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(chatted)
end)

2 comments
Add the if statement "if player:GetRankInGroup(123456789) >= 100 then" directly after line 15.
Doesn't work