llocal 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
game.Players.PlayerAdded:connect(onPlayerAdded)
Please test this, this is my 5th time asking and every code I got was dysfunctional.

3 comments
You're wanting to do a LocalPart? This must be a LocalScript. In which case PlayerAdded would fail to execute properly in the script.
SO what do I do...
I don't know about this must you seem to have misspelled your "local" while assigning the variable "Players", and probably you have to put this script into LocalScript.