You can write your topic however you want, but you need to answer these questions:
What do you want to achieve?
so only ranks 250+ can use !open and !close to open door
What is the issue?
idk how to make those
function LookRank(player)
local Groups = game:GetService("GroupService"):GetGroupsAsync(player.UserId)
for i=1, #Groups do
if Groups[i].Name == "group name" then
return Groups[i].Rank
end
end
return 0
end
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
if LookRank(player) >= 250 then
if (msg:lower) == "!open") then
script.Parent.CanCollide = false
wait(1)
elseif (msg:lower == "!close") then
script.Parent.CanCollide = true
end
end
end)
local GroupID = 0
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
if player:GetRankInGroup(GroupID) >= 250 then
if (msg:lower) == "!open" then
script.Parent.CanCollide = false
wait(1)
elseif (msg:lower == "!close") then
script.Parent.CanCollide = true
end
end
end)
end)
Cool, doesn’t make a difference either way. Wasn’t sure if you wanted the door to auto close after a second. But sounds like it works how you want it to.