-----Group 1----
GroupId = 921838
min = 1
max = 255
-----Group 2----
GroupId2 = -1
min2 = -1
max2 = -1
--Specific Settings--
Door = script.Parent
Debounce = false
local teleportto = game.Workspace.OutsideDoor
local location = {teleportto.Position}
local x = location[1].x
local y = location[1].y
local z = location[1].z
----------
--Script--
----------
function Touched(Part)
local Human = Part.Parent:findFirstChild("Humanoid")
if Human ~= nil then
print("Work")
if Debounce then return end
Debounce = true
if Part.Parent then
print("Work2")
print("Work3.1")
if Human.Parent:GetRankInGroup(GroupId) >= min and Human.Parent:GetRankInGroup(GroupId) <= max or Human.Parent:GetRankInGroup(GroupId2) >= min2 and Human.Parent:GetRankInGroup(GroupId2) <= max2 then
print("work4")
Human.Parent.Character.Torso.CFrame = CFrame.new(Vector3.new(x,y,z))
print("Work5")
else
Part.Parent:breakJoints()
script.Parent.Denied:play()
end end end Debounce = false
Door.Touched:connect(Touched)
So what I am trying to do is make a new group only door, but this is the error I get. The parts that the player will get teleported are linked correctly. And what I mean by that is that they are in the right spot in the game explorer. The below answer did help but now a new error has arisen, sorry for the inconvenience and question asking. :( Any help is appreciated! :D
21:05:46.604 - GetRankInGroup is not a valid member of Model
21:05:46.606 - Script 'Workspace.Group Rank Only Door V1.5.1.Door.Group Rank Based', Line 29

3 comments
That fixed a problem now a new one has arisen. And I dont ask questions often so please don't feel as I am just a punk who wants stuff done for them. I have been trying to finish this for 3 days now :(
No problem, you aren't a punk for asking questions! If you thought my answer helped you can upvote. I understand if you don't accept it since the other person solved your second problem.
This still does not work same error