I'm trying to implement a menu in my game, and I'm having trouble. I can't see whats wrong. Any help would be appreciated, thank you.
function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.M then
game.Player.LocalPlayer.PlayerGui.Menu.Enabled = true
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)
(This is inside StarterPlayer.StarterPlayerScripts, and is a LocalScript)
Error:
Script 'Players.jetpush123.PlayerScripts.LocalScript', Line 3
Player is not a valid member of DataModel

4 comments
Oh, and replace player with LocalPlayer
ninja'd me
yea i just figured that out with the help of godlydeathdragon, tysm man for your help :)
np :D