local config = script.Parent.Configuration
game.Players.PlayerAdded:Connect(function(p)
p.Chatted:Connect(function(chat)
if chat ==";b" then
GetRankInGroup(config.GroupId.Value) >= config.RankId.Value then
p.Character.HumanoidRootPart.CFrame = CFrame.new(workspace.teleport.Position)
end
end)
end)
COMMUNITY QUESTION
Expected identifier when parsing expression, got '>='. How do I fix?
2 answers
You had some issues with your ends and forgot to put an if before GetRankInGroup
local config = script.Parent.Configuration
game.Players.PlayerAdded:Connect(function(p)
p.Chatted:Connect(function(chat)
if chat ==";b" then
if p:GetRankInGroup(config.GroupId.Value) >= config.RankId.Value then
p.Character.HumanoidRootPart.CFrame = CFrame.new(workspace.teleport.Position)
end
end
end)
end)
4 comments
0
For some reason, it now says "W001: Unknown global 'GetRankInGroup'
0
My bad how about now
0
https://prnt.sc/rr89pq this is what is in my configuartion. rn, but im going to try it out if it works
0
weird, it's not working
thats because GetRankInGroup is a function that checks the players in the group
if i were you change that like this
01 local config = script.Parent.Configuration
02
03 game.Players.PlayerAdded:Connect(function(p)
04 p.Chatted:Connect(function(chat)
05 if chat ==";b" then
06 p: GetRankInGroup(config.GroupId.Value) >= config.RankId.Value then
07 p.Character.HumanoidRootPart.CFrame =
CFrame.new(workspace.teleport.Position)
else
08 -- do something here lol
09 end
10 end)
11 end)
2 comments
0
it doesnt work, can you tell me if i copied correctly? https://prnt.sc/rrw0hd
0
hold on imma write some code in studio
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Can you put this into a code block