If you are trying to attach something to your character, you can do it from within your character class like so:
UPROPERTY(VisibleDefaultsOnly, Category = "Skate) // This is so we can set the mesh in the editor
And then create it in your constructor like so:
Skate = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("Skate"));
And attach it in BeginPlay like so:
Skate->AttachTo(MESH_COMPONENT_OF_YOUR_CHARACTER_GOES_HERE, TEXT("SkateSocket"), EAttachLocation::SnapToTargetIncludingScale, true);
This is assuming that your attachable objects are skeletal meshes (which they should be) and if you don’t set up armatures in your modeling program then Unreal will generate a very rudimentary skeleton for your mesh on import which should work just fine for basic stuff.
If you need to attach the object from inside your skate class:
You’ll need to obtain a reference to your character class like so:
ASkateCharacter* CharacterReference = Cast<ASkateCharacter>(GetWorld()->GetFirstPlayerController()->GetCharacter());
You’ll also have to include your ASkateCharacter.h in the .cpp in order to use it properly.
Once you have a proper reference to your character, you can attach it the same as above by accessing the character mesh like this: