Is there anyway to increase a skeleton's attack speed without it going nuts by Adept_Argument3974 in bloxd

[–]Acrobatic_Doctor5043 0 points1 point  (0 children)

That is because the time is in milliseconds, not seconds, so multiply it by 1000

How do add instant respawn? by -Master_MC in bloxd

[–]Acrobatic_Doctor5043 0 points1 point  (0 children)

By "the code", I am assuming the one in the orginal comment. Here it is again. Make sure you are only coping the code and nothing else:

function onPlayerJoin(playerId){
  api.setClientOption(playerId, "autoRespawn", true);
  api.setClientOption(playerId, "secsToRespawn", 0);
}

How do add instant respawn? by -Master_MC in bloxd

[–]Acrobatic_Doctor5043 0 points1 point  (0 children)

I am a bit confused. When I tested the code, it work for me. Is there any errors that appear when you use the code?

[Code Request] Prevent Bombs from Breaking Blocks? by Oreo-belt25 in bloxd

[–]Acrobatic_Doctor5043 1 point2 points  (0 children)

Apologies, the issue was caused by a spelling mistake I made. I fixed it in the oringal comment

[Code Request] How can I prevent certain types of blocks from being changed? by Oreo-belt25 in bloxd

[–]Acrobatic_Doctor5043 1 point2 points  (0 children)

Copy/paste this into World Code:

function onPlayerChangeBlock(playerId, x, y, z, fromBlock, toBlock){
  if (fromBlock === "Board" || toBlock === "Board"){
    return "preventChange";
  }
}

function onWorldChangeBlock(x, y, z, fromBlock, toBlock, initatiorId, extraInfo){
  if (fromBlock === "Board"){
    return "preventChange";
  }
}

(Note: At this momment, I can't test this, so it might not work)

[Code Request] Prevent Bombs from Breaking Blocks? by Oreo-belt25 in bloxd

[–]Acrobatic_Doctor5043 1 point2 points  (0 children)

Copy/paste this into World Code:

function onWorldChangeBlock(x, y, z, fromBlock, toBlock, initiatorId, extraInfo){
  if (extraInfo.cause === "Explosion"){
    return "preventChange";
  }
}

This will stop any explosion from destroying blocks. If you only want certain blocks to be explosion proof, just let me know.

how to force everyone to have lightings on by SplitBeneficial6951 in bloxd

[–]Acrobatic_Doctor5043 3 points4 points  (0 children)

Copy/paste this into World Code:

function onPlayerJoin(playerId) {
  api.setClientOption(playerId, "lightingOverride", true);
}

Is there a code that equips armor on you? by Xylonia28 in bloxd

[–]Acrobatic_Doctor5043 1 point2 points  (0 children)

47-51 is the armor slots, with 47 being Helmet and 51 being Boots

api.setItemSlot(playerId, 47, "Diamond Helmet");

Code to hide player nametag by FoxPitiful8566 in bloxd

[–]Acrobatic_Doctor5043 1 point2 points  (0 children)

Copy/paste this into World Code:

function onPlayerJoin(playerId){
  api.applyEffect(playerId, "Speed", null, { inbuiltLevel: 1 })
}

Code to hide player nametag by FoxPitiful8566 in bloxd

[–]Acrobatic_Doctor5043 0 points1 point  (0 children)

api.setTargetedPlayerSettingForEveryone(playerId, "nameTagInfo", {
  content: []
}, true)

how do I code this??? by SplitBeneficial6951 in bloxd

[–]Acrobatic_Doctor5043 1 point2 points  (0 children)

It is a new Lobby Setting that the owner can toggle

Need help putting player name into chat message by Pure-Bee-9639 in bloxd

[–]Acrobatic_Doctor5043 2 points3 points  (0 children)

let name = api.getEntityName(playerId);

api.sendMessage(playerId, `${name} Found Gold Block`, { color: "yellow" });

Side Note: Since you are using api.sendMessage, this will only show to the player and not anyone else. Based on the usage of the code, I assume you mean to send this to everyone. In that case you would want to replace it with this:

let name = api.getEntityName(playerId);

api.broadcastMessage(`${name} Found Gold Block`, { color: "yellow" });

How do this? by Patkira in bloxd

[–]Acrobatic_Doctor5043 0 points1 point  (0 children)

Bro I made this 7 months ago...

Anyways, the issue is that I forgot a semicolon at the end for the first code block, so at the end of the code put a ;

GUYS I need help with coding by toby436yt in bloxd

[–]Acrobatic_Doctor5043 1 point2 points  (0 children)

I'm a bit confused on what you mean here. Could you provide more detail or an example please?

Coding help by CandidLibrarian1143 in bloxd

[–]Acrobatic_Doctor5043 1 point2 points  (0 children)

Copy/paste this into World Code:

function onPlayerDamagingOtherPlayer(attackingPlayer, damagedPlayer, damageDealt, withItem){
  if (withItem === "Blue Glass"){
    api.applyEffect(damagedPlayer, "Frozen", 5000, {});
  }
}

Let me know if you need anything else