#change component value with script Help

1 messages · Page 1 of 1 (latest)

snow crest
#

i need to change these two value in one component

        "width": 0.6,
        "height": 1.8
      },```
i have this simple script here but the thing is it has 2 value in one component so idont know how to change it
```js
system.runInterval(() => {
  for (const player of world.getPlayers()) {        
    var hitbox=player.isSprinting
    if (!hitbox && player.hasTag("clutch")) {     
      let hitboxwidth = player.getComponent( 'minecraft:collision_box' )
      hitboxwidth.setCurrentValue( 500 )   
    }
  }
});```
placid wolf
#

at least not one that you can get through script api

#

this is a list of components you can get:

EntityAddRiderComponent
EntityAgeableComponent
EntityAttributeComponent
EntityBaseMovementComponent
EntityBreathableComponent
EntityCanClimbComponent
EntityCanFlyComponent
EntityCanPowerJumpComponent
EntityColorComponent
EntityEquippableComponent
EntityFireImmuneComponent
EntityFloatsInLiquidComponent
EntityFlyingSpeedComponent
EntityFrictionModifierComponent
EntityGroundOffsetComponent
EntityHealableComponent
EntityInventoryComponent
EntityIsBabyComponent
EntityIsChargedComponent
EntityIsChestedComponent
EntityIsDyeableComponent
EntityIsHiddenWhenInvisibleComponent
EntityIsIgnitedComponent
EntityIsIllagerCaptainComponent
EntityIsSaddledComponent
EntityIsShakingComponent
EntityIsShearedComponent
EntityIsStackableComponent
EntityIsStunnedComponent
EntityIsTamedComponent
EntityItemComponent
EntityLeashableComponent
EntityMarkVariantComponent
EntityMountTamingComponent
EntityNavigationComponent
EntityNpcComponent
EntityOnFireComponent
EntityProjectileComponent
EntityPushThroughComponent
EntityRideableComponent
EntityRidingComponent
EntityScaleComponent
EntitySkinIdComponent
EntityStrengthComponent
EntityTameableComponent
EntityTypeFamilyComponent
EntityVariantComponent
EntityWantsJockeyComponent

snow crest
#

with different tags theres different value

placid wolf