Currently making a survival game with NPCS. One thing that needs to be done is hunger. I am using models for NPCS. Such as this one, I am currently planning out scripts before I start making this.
On one model, it is an npc that drops meat. I know where the meat goes and it is going in Game.playerStatys.StarterGui.Hunger.Value = +6
On this script however, I’m not exactly sure if this is planned out correctly.
Game.ServerScriptService.LocalScript = Value
valuePts.addValue = DodoMeat
DodoMeat.Value = 6
game.Player.LocalPlayer.Hunger.valuePts(function(DodoMeatValue)
when game.ReplicatedStorage.Folder.NPC.Dodo = Killed do
game.ReplicatedStorage.Folder.NPC.Dodo.Killed:FireAllClients
game.GetService(Event)
Event.Name = DodoKilled
when DodoKilled = true then
game.ReplicatedStorage.Folder.NPC.Dodo(function(drop)
drop(function(Killed)
game.ReplicatedStorage.Folder.NPC.Dodo.Killed = Event
when DodoKilled = true then do
game.ReplicatedStorage.Folder.Items.DodoMeat.Parent = Game.Players.Inventory