How To Make A Npc Talk On Studio Lite

Поделиться
HTML-код
  • Опубликовано: 14 янв 2025

Комментарии • 15

  • @Theholywaffle_guy
    @Theholywaffle_guy 29 дней назад +2

    local ChatService = game:GetService("Chat")
    -- List of phrases the mesh will say
    local phrases = {
    "Hello",
    "Im A Talking Npc",
    "Now Get Out",
    "GET OUT"
    }
    -- Function to make the mesh talk
    local function makeMeshTalk()
    while true do
    local randomPhrase = phrases[math.random(1, #phrases)]
    ChatService:Chat(script.Parent, randomPhrase, Enum.ChatColor.White)
    wait(4) -- Wait for 4 seconds before the next message
    end
    end
    -- Start the talking loop
    makeMeshTalk()

  • @MidnightGamerShorts
    @MidnightGamerShorts 7 дней назад

    Hey can u make a quest system npc

  • @LMJ_videos
    @LMJ_videos Месяц назад +2

    Talk Script [Inside The Mesh]
    local ChatService = game:GetService("Chat")
    --List of phrases the mesh will say
    local phrases = {
    "Hello",
    "Im A Talking Npc",
    "Now Get Out",
    "GET OUT"
    }
    -- Function to make the mesh talk
    local function makeMeshTalk() while true do
    local randomPhrase = phrases [math.random(1, #phrases)]
    ChatService:Chat(script.Parent, random Phrase, Enum.ChatColor.White)
    wait(4) -- Wait for 4 seconds before the next
    message
    end
    end
    --Start the talking loop
    makeMesh Talk()

  • @SCARAB21
    @SCARAB21 19 дней назад

    How you get the npc model?

  • @VictorValadezGallegos
    @VictorValadezGallegos 2 месяца назад +1

    How i make move

    • @azure2nd
      @azure2nd  2 месяца назад +1

      @@VictorValadezGallegos it's just an npc that talks

    • @a_random_white_guy
      @a_random_white_guy Месяц назад +1

      Dw bro i got you i Made and script that allows your parts able to move (this fits the script this guy makes) also here it is:
      local part = script.Parent -- Automatically references the part or NPC this script is attached to
      local movementRadius = 10 -- Maximum distance the part can move
      local cooldown = 5 -- Time in seconds before the part moves again
      local initialPosition = part.Position -- Store the starting position of the part
      while true do
      -- Wait for the cooldown time
      task.wait(cooldown)
      -- Generate random offsets within the movement radius
      local offsetX = math.random(-movementRadius, movementRadius)
      local offsetZ = math.random(-movementRadius, movementRadius)
      local newPosition = Vector3.new(
      initialPosition.X + offsetX,
      initialPosition.Y,
      initialPosition.Z + offsetZ
      )
      -- Move the part to the new position
      part.Position = newPosition
      end
      (note Ima make a video about this you can paste the script in the description and just don't care about those baby's videos that is just my mom's videos also if you want to you can change the movement radius and the cooldown of how long you want to make the part Will move)

    • @a_random_white_guy
      @a_random_white_guy Месяц назад +1

      OH wrong script srry bro that was the one that i Made like yesterday my bad i tested it out is just teleporting here dude my bad:
      local part = script.Parent -- Automatically references the NPC
      local movementRadius = 10 -- Maximum distance the NPC can move
      local cooldown = 5 -- Time in seconds before the NPC moves again
      local movementSpeed = 10 -- Speed of movement (studs per second)
      local initialPosition = part.Position -- Store the NPC's starting position
      while true do
      -- Wait for the cooldown time
      task.wait(cooldown)
      -- Generate a random target position within the movement radius
      local offsetX = math.random(-movementRadius, movementRadius)
      local offsetZ = math.random(-movementRadius, movementRadius)
      local targetPosition = Vector3.new(
      initialPosition.X + offsetX,
      initialPosition.Y,
      initialPosition.Z + offsetZ
      )
      -- Calculate direction to the target and set rotation
      local direction = (targetPosition - part.Position).unit
      part.CFrame = CFrame.lookAt(part.Position, part.Position + direction)
      -- Smoothly move the NPC to the target position
      local startPosition = part.Position
      local distance = (targetPosition - startPosition).Magnitude
      local travelTime = distance / movementSpeed
      local elapsedTime = 0
      while elapsedTime < travelTime do
      elapsedTime = elapsedTime + task.wait()
      local progress = elapsedTime / travelTime
      part.Position = startPosition:Lerp(targetPosition, progress)
      end
      -- Ensure the NPC reaches the target position
      part.Position = targetPosition
      end

  • @FARHANaFz_FARHAN
    @FARHANaFz_FARHAN Месяц назад

    Bro, please teach me how to make a green Avatar into our Avatar.

    • @wolliveroliveira1163
      @wolliveroliveira1163 27 дней назад

      local ChatService = game:GetService("Chat")
      -- List of phrases the mesh will say
      local phrases = {
      "Hello",
      "Im A Talking Npc",
      "Now Get Out",
      "GET OUT"
      }
      -- Function to make the mesh talk
      local function makeMeshTalk()
      while true do
      local randomPhrase = phrases[math.random(1, #phrases)]
      ChatService:Chat(script.Parent, randomPhrase, Enum.ChatColor.White)
      wait(4) -- Wait for 4 seconds before the next message
      end
      end

  • @Supercoolcowyes
    @Supercoolcowyes 14 дней назад

    local ChatService = game:GetService("Chat")
    -- List of phrases the mesh will say
    local phrases = {
    "Hello",
    "Im A Talking Npc",
    "Now Get Out",
    "GET OUT"
    }
    -- Function to make the mesh talk
    local function makeMeshTalk()
    while true do
    local randomPhrase = phrases[math.random(1, #phrases)]
    ChatService:Chat(script.Parent, randomPhrase, Enum.ChatColor.White)
    wait(4) -- Wait for 4 seconds before the next message
    end
    end
    -- Start the talking loop
    makeMeshTalk()
    This doesn’t work

  • @FALAS_DA_VERDADE_00
    @FALAS_DA_VERDADE_00 2 месяца назад

    I am unable to copy the script correctly, it is giving an error

    • @azure2nd
      @azure2nd  2 месяца назад

      I fix that later

  • @Zanedits-78
    @Zanedits-78 11 дней назад

    local ChatService = game:GetService("Chat")
    -- List of phrases the mesh will say
    local phrases = {
    "Hello",
    "Im A Talking Npc",
    "Now Get Out",
    "GET OUT"
    }
    -- Function to make the mesh talk
    local function makeMeshTalk()
    while true do
    local randomPhrase = phrases[math.random(1, #phrases)]
    ChatService:Chat(script.Parent, randomPhrase, Enum.ChatColor.White)
    wait(4) -- Wait for 4 seconds before the next message
    end
    end
    -- Start the talking loop
    makeMeshTalk