Change Villager's name
#3
(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
Reply
Thanks given by:


Messages In This Thread
Change Villager's name - by MGlolenstine - 08-01-2018, 10:46 PM
RE: Change Villager's name - by NiLSPACE - 08-02-2018, 02:19 AM
RE: Change Villager's name - by MGlolenstine - 08-02-2018, 05:20 AM
RE: Change Villager's name - by NiLSPACE - 08-02-2018, 05:27 AM
RE: Change Villager's name - by MGlolenstine - 08-02-2018, 05:40 AM
RE: Change Villager's name - by xoft - 08-02-2018, 06:36 AM
RE: Change Villager's name - by NiLSPACE - 08-02-2018, 06:45 AM
RE: Change Villager's name - by MGlolenstine - 08-02-2018, 06:55 AM
RE: Change Villager's name - by xoft - 08-02-2018, 07:01 AM
RE: Change Villager's name - by MGlolenstine - 08-02-2018, 07:05 AM
RE: Change Villager's name - by NiLSPACE - 08-02-2018, 04:20 PM
RE: Change Villager's name - by MGlolenstine - 08-02-2018, 05:34 PM
RE: Change Villager's name - by NiLSPACE - 08-02-2018, 09:47 PM
RE: Change Villager's name - by MGlolenstine - 08-02-2018, 11:13 PM
RE: Change Villager's name - by xoft - 08-02-2018, 11:31 PM
RE: Change Villager's name - by NiLSPACE - 08-03-2018, 01:22 AM
RE: Change Villager's name - by MGlolenstine - 08-03-2018, 06:05 PM
RE: Change Villager's name - by xoft - 08-07-2018, 05:23 AM



Users browsing this thread: 5 Guest(s)