I don't know why this doesn't work on Roblox. However, it works on studio just fine, so I am not sure what I did. I have two scripts that both work together to make a Group/Rank only teleporting GUI. Both are children under a TextButton in a ScreenGui in StarterGui.
The first script is to verify if the player is able to see/select the Teleporting GUI. Otherwise the GUI stays invisible.
local Player = game.Players.LocalPlayer
if Player:IsInGroup(1122694) and Player:GetRankInGroup(1122694) >= 9 then
script.Parent.Visible = true
script.Parent.Selectable = true
end
And the second script teleports the player.
pth = script.Parent.Parent.Parent.Parent.Character
function Click()
pth.Humanoid.Jump = true
wait(.3)
pth.Torso.CFrame = CFrame.new(-243.919, 17.021, -419.53)
pth.Humanoid.Jump = false
end
script.Parent.MouseButton1Down:connect(Click)
I also have other ScreenGui buttons that teleport easily, but the difference between that and this one is the requirement of being in a group and in a specific rank.

2 comments
Naturally when something works in studio but not in-game, you have to presume that it's something to do with serverscripts trying to access client-only stuff (saying as studio always runs on the client). Have you got FilteringEnabled working?
I am starting to learn how to script better, but I am not very familiar with FilteringEnabled. I will look into it though. Thanks!