- Видео 10
- Просмотров 3 395
AvocadoStudio
Добавлен 28 май 2021
These channel will have some tutorial about Roblox Studio
Видео
Simple IceCream System Tutorial + Free Model l Roblox Studio
Просмотров 1104 месяца назад
Here are the system model link: Donut : create.roblox.com/store/asset/18952769406/Donut Milkshake : create.roblox.com/store/asset/18952761595/Milkshake IceCream : create.roblox.com/store/asset/18952722649/IceCreamSystem Hope this could help you(o゜▽゜)o☆
Simple Touch Open Light Tutorial l Roblox Studio
Просмотров 126 месяцев назад
Simple Touch Open Light Tutorial l Roblox Studio
Low Poly Restaurant Sold ( 20 Robux )
Просмотров 239 месяцев назад
DIscord server : discord.gg/YKFskAX6d4
Spotlight that follow you anywhere tutorial [ Roblox Studio ]
Просмотров 358Год назад
Spotlight that follow you anywhere tutorial [ Roblox Studio ]
How to make a simple npc ordering system in roblox studio.
Просмотров 920Год назад
enjoy.Comment what tutorial next! :)
[RobloxStudio] How to make cafe food/drink system.
Просмотров 612Год назад
You can make any system that you want. like this video:)
[ ROBLOX STUDIO ] AI NPC CASHIER
Просмотров 500Год назад
my model:www.roblox.com/library/14050187899/ai-npc-cashier orginal model:www.roblox.com/library/13721934036/NPC-Ordering-system make this model owner:ruclips.net/video/8zWkfNsSwHg/видео.html i just upgrade some of the script :)
I'm the 120 subscriber it's really help me thank you so much❤
local clickdetector = script.parent local button = script.oarent.parent local door = script.parent.parent.parent.door if clickdetector then clickdetector.mouseclick:connect(function(player) if player then door end end) end
a lil typo on the button variable
Tnx You Gain A Sub😁
You should be using task.wait() because it's more optimized and the if ClickDetector doesn't work because if there isn't the parent it would give you an error because you referenced parent in nil
is there any way that you can make a door with a lot of parts of the door it would be really nice if you could.(not saying this bad video its a great video)
for _, part in Door:GetChildren() do part.Transparency = 1 part.CanCollide = false end
If your door is a model
nice tutorial bro! ;)
Thx
hey pls make this a model
I'll will make a new video asap and have free model (●'◡'●)
@@rblxstudioavocado alr thanks
Hey bro uhm can you make it into a model and link in your description next time you make a video. So I can go to models and just paste it into my game?? Please..
Thank you you saved my life
Wassup my guy. I am creating a cafe rn, are you interested on helping me making a cafe system? I pay by robux
I not good at scripting so sorry :<
Please do ice cream next I am making an ice cream parlor and this is the only one I can find.
Next video :>
theres aint pinned comment
omg thanks i learned it
-- Function to find the closest humanoid's head function findHead(pos) local head = nil local dist = 5000000 local players = game:GetService("Players") for _, player in pairs(players:GetPlayers()) do local character = player.Character if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid and humanoid.Health > 0 then local headPart = character:FindFirstChild("Head") if headPart then local newDist = (headPart.Position - pos).magnitude if newDist < dist then head = headPart dist = newDist end end end end end return head end -- Main loop with a delay while true do wait(0.1) -- Adjust the delay as needed -- Get the target head local head = findHead(script.Parent.Position) if head then -- Make the part face the head (maintains orientation) script.Parent.CFrame = CFrame.new(script.Parent.Position, head.Position) else -- Debug: Print a message if no head is found local pos = script.Parent.Position print("No head found at " .. tostring(pos)) end end
is there a way to make it follow a specific username?
@@RobloxMisfitsManager No if i try to make a new one
More tutorials coming soon!❤ [ Can sub count increase? ]
Any tutorial on how to use our own tool? I tried to do it but it wont work
Can you make the tools in a model and sent the link here.I help you to check it :)
Is there a way I can do this with custom models
yea
I replaced the milk with my food but the npc dosent show the proximity prompt i don’t know what’s going on I watched this like 2 times
🤔 Is the proximity prompt location correct?
@@rblxstudioavocadooh now I fixed it
@@rblxstudioavocadoquestion can you make a video like this but you have to hold out a item and when you give it to npc it disappears
@@bluekiddo1 use :destroy to make it disapear
Hello! ! This system is so great! Should I apply the translation function to add all languages? Or should I just add the language to the script! ?We are waiting for your reply!
🤔 I think apply translation function to add languages :)
@@rblxstudioavocado thank you!
please put the script in the comments!!!
the script is in the model
local npc = script.Parent local chatDistance = 6 -- reduce this value to decrease the distance required for the NPC to respond to the player local activePlayers = {} local currentTalkingPlayer = nil local currentTalkingTime = 0 local talkingTimeout = 50 -- change this value to adjust the time limit for talking local function processOrder(player, item, quantity) local itemName = item.Name:lower() local order = tostring(quantity).." "..itemName.."(s)" local cost = 0 if itemName == "burger" then cost = 20 elseif itemName == "fries" then cost = 10 elseif itemName == "drink" then cost = 5 end if cost > 0 then local playerMoney = player.leaderstats.Money if playerMoney.Value < cost * quantity then game:GetService("Chat"):Chat(script.Parent.Head, "Sorry, "..player.Name..", you don't have enough money to order that.", Enum.ChatColor.Blue) return end playerMoney.Value = playerMoney.Value - cost * quantity end if itemName == "burger" or itemName == "fries" or itemName == "drink" then currentTalkingPlayer = player -- Announce order and walk to the kitchen counter game:GetService("Chat"):Chat(script.Parent.Head, "Please wait a moment while we prepare your order, "..player.Name.."...", Enum.ChatColor.Blue) npc.Humanoid:MoveTo(Vector3.new(3.301, 3, -51.351)) -- Replace x, y, z with the position of the kitchen counter -- Delay for the preparation time (you can customize the duration) wait(5) -- Adjust the duration as per your needs -- Walk back to the player with the order npc.Humanoid:MoveTo(Vector3.new(1.517, 3, -21.465)) wait(1.6) -- Add a small delay before speaking -- Announce the order is ready and ask if they want anything else game:GetService("Chat"):Chat(script.Parent.Head, "Welcome, "..player.Name.."! Here's your order ("..order.."). Enjoy your meal! Is there anything else you would like to order?", Enum.ChatColor.Blue) -- Give the order to the player for i = 1, quantity do local itemClone = item:Clone() itemClone.Parent = player.Backpack end else game:GetService("Chat"):Chat(script.Parent.Head, "Here's your order ("..order.."), "..player.Name.."! Enjoy your meal!", Enum.ChatColor.Blue) end end local function startChatting(player) if currentTalkingPlayer then game:GetService("Chat"):Chat(script.Parent.Head, "Sorry, "..player.Name..", I'm currently busy talking to "..currentTalkingPlayer.Name..". Please wait for your turn.", Enum.ChatColor.Blue) return end currentTalkingPlayer = player currentTalkingTime = tick() end local function stopChatting(player) if currentTalkingPlayer == player then currentTalkingPlayer = nil currentTalkingTime = 0 -- Add a conditional block for fries local itemName = player.leaderstats.LastOrder.Value:lower() if itemName == "burger" or itemName == "fries" or itemName == "drink" then game:GetService("Chat"):Chat(script.Parent.Head, "Goodbye, "..player.Name.."! Have a great day!", Enum.ChatColor.Blue) else game:GetService("Chat"):Chat(script.Parent.Head, "Here's your order ("..player.leaderstats.LastOrder.Value.."), "..player.Name.."! Enjoy your meal!", Enum.ChatColor.Blue) end end end game.Players.PlayerAdded:Connect(function(player) activePlayers[player] = true player.CharacterAdded:Connect(function(character) activePlayers[player] = true end) player.CharacterRemoving:Connect(function(character) activePlayers[player] = nil if currentTalkingPlayer == player then currentTalkingPlayer = nil currentTalkingTime = 0 game:GetService("Chat"):Chat(script.Parent.Head, "Goodbye, "..player.Name.."! Have a great day!", Enum.ChatColor.Blue) end end) player.Chatted:Connect(function(msg) if not activePlayers[player] then return end if (msg:lower():find("hello") or msg:lower():find("hi") or msg:lower():find("hey") or msg:lower():find("hola")) and (player.Character and (player.Character.Head.Position - npc.Head.Position).magnitude <= chatDistance) then startChatting(player) game:GetService("Chat"):Chat(script.Parent.Head, "Welcome to the restaurant, "..player.Name.."! What would you like to order?", Enum.ChatColor.Blue) elseif currentTalkingPlayer == player then if msg == "bye" then stopChatting(player) elseif msg:lower():find("^%d*%s*burger[s]*%s*$") then local quantity = tonumber(msg:match("%d+")) or 1 local burger = game.ServerStorage.Burger processOrder(player, burger, quantity) elseif msg:lower():find("^%d*%s*fries%s*$") then local quantity = tonumber(msg:match("%d+")) or 1 local fries = game.ServerStorage.Fries processOrder(player, fries, quantity) elseif msg:lower():find("^%d*%s*drink[s]*%s*$") then local quantity = tonumber(msg:match("%d+")) or 1 local drink = game.ServerStorage.Drink processOrder(player, drink, quantity) elseif msg:lower() == "yes" and (player.Character and (player.Character.Head.Position - npc.Head.Position).magnitude <= chatDistance) then game:GetService("Chat"):Chat(script.Parent.Head, "What else would you like to order, "..player.Name.."?", Enum.ChatColor.Blue) elseif msg:lower() == "no" and (player.Character and (player.Character.Head.Position - npc.Head.Position).magnitude <= chatDistance) then game:GetService("Chat"):Chat(script.Parent.Head, "Goodbye, "..player.Name.."! Have a great day!", Enum.ChatColor.Blue) stopChatting(player) else game:GetService("Chat"):Chat(script.Parent.Head, "Sorry, I didn't understand. What would you like to order?", Enum.ChatColor.Blue) end end end) end) game.Players.PlayerRemoving:Connect(function(player) activePlayers[player] = nil if currentTalkingPlayer == player then currentTalkingPlayer = nil currentTalkingTime = 0 end end) while wait(1) do if currentTalkingPlayer and (tick() - currentTalkingTime) >= talkingTimeout then game:GetService("Chat"):Chat(script.Parent.Head, "Sorry, "..currentTalkingPlayer.Name..", our conversation has timed out. Please come back and order again!", Enum.ChatColor.Blue) currentTalkingPlayer = nil currentTalkingTime = 0 end end
I also subscribed. :D
Hi, this helped A LOT. I tried looking for something like this for ages. You just helped me out. Could you possibly make it to where the NPC has a pathfind service. For example, an NPC is able to walk up to the counter, table, etc and then asks for food. Then, once the player gives the NPC the desired order, he leaves. And then a totally different NPC comes up and asks for something different. Do you understand what I am trying to ask here? Sorry if it is too much.
I will try to make it. :)
@@rblxstudioavocado Thank you!!
Håll käften
@@rblxstudioavocado I need something like this too. Could you do it?
for the pathservice use this script: local npc = script.Parent local path = game:GetService("PathfindingService") local humanoid = npc.Humanoid local waypoints = game.Workspace.Waypoints -- make sure to add a folder named "Waypoints" and name the waypoints as a number function finishedinstance() npc.n.Enabled = true end for waypoint = 1, #waypoints:GetChildren() do humanoid:MoveTo(waypoints[waypoint].Position) humanoid.MoveToFinished:Wait() humanoid.MoveToFinished:Connect(finishedinstance) end
Whenever I try to use this and I order food, the NPC keeps walking until it stops. It doesn’t return to its original location
-- Walk back to the player with the order npc.Humanoid:MoveTo(Vector3.new(1.517, 3, -21.465)) -------- Change this position to the original position wait(1.6) -- Add a small delay before speaking
@@rblxstudioavocadookay thanks!