Code that I copied directly does not work.

Thank you everyone. It works now. This is why I chose unreal.