PlayButton not working?

I am using UE4 4.10.4, and whenever I use my “PlayButton” it removes all of the widgets, but it does not let me move, shoot, or anything else. Here are some screenshots.

Before I hit play (Game already started for some reason…): Screenshot - 12fb41cd6ebad3f72275d0929af69b52 - Gyazo
After I hit play (Game continues going and doesn’t reset, I can also not move, shoot, or cannot see my crosshair I created or score or health, I can also not die.): Screenshot - 536341c0cc5216eba161761031c09a86 - Gyazo
Could someone please explain my error to me? Thanks.

Hey Bhechmer!

Try these nodes, SetInputModeGameOnly SetInputModeUIOnly

Use the SetInputModeGameOnly after you press the Play Button, and the SetInputModeUIOnly when you’re heading back to the main menu.

Let me know if it doesn’t work!

I tried this: Screenshot - 9ff195cfaa63929dbc6f24baf6adca1c - Gyazo and it is still not working

Remove SetInputModeUIOnly after Remove From Parent.

It still does not show the crosshair, the health, the score, the ammo, or let you move.

I don’t see any screenshots of the PlayerHUD, so I don’t know what’s up with that. Could you try feeding GetPlayerController into the SetInputModeGameOnly Node?

Are you sure you’re spawning correctly in the world? If you’d disconnect the CreateWidget node from the BeginPlay in your Level Blueprint temporarily, can you move around and see the PlayerHUD?

I just tried to thing in the level blueprint, and I still cannot play. Here is a screenshot of my PlayerHUD:Screenshot - 86631128acaf1d42024b0bb4accc13cd - Gyazo
Screenshot - 6b4db3bf9ead9fd5901d89fa15d1f5fc - Gyazo
Screenshot - 7bad9fa13ed20e4f9f248282b045a684 - Gyazo

The problem isn’t within your MainMenuWidget then. Do you have any Player Start in your level? Are you using the right classes in your Game Mode Settings?

And your PlayerHUD, I can’t see that you’re actually creating the widget anywhere and adding it to your viewport.

Make sure that the Default Pawn Class is the Character Blueprint that you’re using.

Player Start can be found in the Modes panel under the Basic category. Just drag and drop into the level where you want your player to start.

Edit: If your Character Blueprint is namned “PlayerChar”, then you should select that as your Default Pawn Class.

Well, currently my gamemode settings are: Screenshot - 631e0f83fbfec64af69b2b5c5c89d08b - Gyazo
and how do I add a player start to the level?

Also, I added my PlayerHUD in the PlayerCharacter graph:Screenshot - 43cf5a89d9aaca79fbec266464f80476 - Gyazo should I add it in the PlayerhUD graph instead?

Thank you so much! When I switched the default pawn class to “PlayerChar” it let me play the game, but I’m still having a bit of an error: Screen capture - e359a26b9012496cc9537ebd4ebc397c - Gyazo
The game wants to start before I even hit PlayGame. Is there a quick fix to that?

Worked perfectly! Thanks so much for being such a help!

Glad it worked out :slight_smile:

If you’re just looking for a quick fix, then SetGamePaused might work. Set the game to paused when you start the game (EventBeginPlay) and when you press the Play Button, unpause the game.

You’re welcome, good luck! :slight_smile:

The answer to the problem was my GameMode settings. It was set to a different Default Pawn Class then mine. Thanks alot, Fryderider!

Does anyone knows how to fix my PLAY button, i am pressing it but nothing, like am pressing a picture, plas help???