Is this related to your other posts? Your request seems in direct contradiction to this one, where you ask for movement to only affect the z axis, and seems like you’ve almost succeeded.
If it’s not then you can remove .z to apply the speed in any direction forward-facing and fix the type issue. It may need to be negative since forward is negative z.