08-02-2018, 05:20 AM
(08-02-2018, 02:19 AM)NiLSPACE Wrote: You can use the cMonster:SetCustomName method. You can use it like this:
world:DoWithEntityByID(entityId, function(entity) entity:SetCustomName("Name") end)
That's what I tried, but it didn't work...
Here's my code
Code:
local vilName = "Villager123"
function ChangeVillager(Entity)
if(Entity:IsMob())then
Entity:SetRelativeWalkSpeed(0)
Entity:SetCustomName(vilName)
Entity:SetCustomNameAlwaysVisible(true)
vilName = ""
Entity:SetMaxHealth(999999999999)
Entity:SetHealth(999999999999)
end
end