local platform = Instance.new("Part") platform.Parent = game.Workspace.CurrentCamera platform.CFrame = CFrame.new(12.5, 1.71, 17.43) platform.Anchored = true platform.Transparency = .5 platform.Size = Vector3.new(5, 10, 1) local Players = game:GetService("Players") function onPlayerAdded(player) if (player.Name:GetRankInGroup(2551575) >= 239) then platform.CanCollide = false end end Players.PlayerAdded:connect(onPlayerAdded)
The Player function :GetRankInGroup() is a function of the player object, not the name of the player. On line 12, you were trying to use it on the player's name, not the player themselves.
Thus, it can be changed to this:
local Players = game:GetService("Players") local platform = Instance.new("Part") platform.CFrame = CFrame.new(12.5, 1.71, 17.43) platform.Anchored = true platform.Transparency = .5 platform.Size = Vector3.new(5, 10, 1) platform.Parent = workspace.CurrentCamera function onPlayerAdded(player) if (player:GetRankInGroup(2551575) >= 239) then platform.CanCollide = false end end Players.PlayerAdded:connect(onPlayerAdded)