Hey, question about read only table

Hey, so I want to set the player IsVisible to false but I get an error saying something about a read only table. I am a roblox developer and personally I think the core platform is very strange like 40% of the documentation I've read is wrong and this code works

local shiftKeyBinding = "ability_feet"

function OnBindingPressed(player, bindingPressed)
    if bindingPressed == shiftKeyBinding and player.isVisible then
        player.isVisible = false
    end
end

function OnBindingReleased(player, bindingReleased)
    if bindingReleased == shiftKeyBinding and (not player.isVisible) then
        player.isVisible = true
    end
end

function OnPlayerJoined(player)
    player.bindingPressedEvent:Connect(OnBindingPressed)
    player.bindingReleasedEvent:Connect(OnBindingReleased)
end

Game.playerJoinedEvent:Connect(OnPlayerJoined)

but this code does not?

Player.IsVisible = false

The issue is that Player is not defined but player is. As you can see on the OnBindingPressed function, it passes in a Player object and you recieve it as player so to do stuf with it you have to do player.property or player:function()

hmm so similiar to roblox getting player how could I get the player I just tried this

local player = Game.playerJoinedEvent()
print(player.Name)

and also why does this return nil?

Game.playerJoinedEvent:Connect(function(player)
    print(player.Name)
end)