of     1   

silvergoldendog
#224376435Tuesday, August 29, 2017 2:32 AM GMT

local Players = game.Players:GetPlayers() local Hunger = Instance.new("IntValue", Players) Hunger.name = Hunger Hunger.Value = 100 while true do wait(60) Hunger.Value = -10 end in a local script I cant use it on multiple people right now
Alend43
#224376469Tuesday, August 29, 2017 2:33 AM GMT

You have to clone the IntValue
Atchech
#224376519Tuesday, August 29, 2017 2:35 AM GMT

you want it to degrade -10 every 60 seconds?
silvergoldendog
#224376598Tuesday, August 29, 2017 2:37 AM GMT

wait i did a little fixing local Players = game.Players:GetChildren() local Hunger = Instance.new("IntValue") Hunger.Parent = Players Hunger.name = Hunger Hunger.Value = 100 while true do wait(60) Hunger.Value = -5 end It still doesn't work, help please!!
imepic457
#224376612Tuesday, August 29, 2017 2:38 AM GMT

i think putting the value into players wont work since its a local script you can do local player = game.Players.LocalPlayer then you got to change the parent of Hunger to player
Atchech
#224376615Tuesday, August 29, 2017 2:38 AM GMT

Hunger.Value = Hunger.Value -5 *
EatCheetos
#224376634Tuesday, August 29, 2017 2:38 AM GMT

I don't understand why you're asking that question. You should be testing it yourself to see if your code works. If it doesn't, then you ask for help.
dj7679
#224376681Tuesday, August 29, 2017 2:40 AM GMT

What are you trying to do ?
imepic457
#224376699Tuesday, August 29, 2017 2:40 AM GMT

@cheeto i guess he worded it wrong because he said "it still wont work"
EatCheetos
#224376732Tuesday, August 29, 2017 2:41 AM GMT

OK this is a reply to your updated code. First, the it's Hunger.Name, not Hunger.name. Second, the code doesn't work because you are only creating one instance. Third, you have to cycle through the variable Players by using a for _,v in pairs function.
silvergoldendog
#224376909Tuesday, August 29, 2017 2:47 AM GMT

i dont understand what you mean by only one instance? And i dont know how to do the for i,v in pairs for players :/
Zued
#224376933Tuesday, August 29, 2017 2:48 AM GMT

local Players = game.Players:GetChildren() local Hunger = Instance.new("IntValue") Hunger.Parent = game.Players.LocalPlayer Hunger.Name = "Hunger" Hunger.Value = 100 while true do wait(60) Hunger.Value = Hunger.Value - 5 end
EatCheetos
#224377072Tuesday, August 29, 2017 2:52 AM GMT

http://wiki.roblox.com/index.php?title=Global_namespace/Basic_functions&redirect=no#pairs I, v in pairs basically loops through the values of a table. Here's an example: Players = game.Players:GetPlayers() for i, v in pairs(Players) do -- code here end
Em_ily
#224377121Tuesday, August 29, 2017 2:53 AM GMT

For i,v in pairs is a loop that goes over a set number of parts. I = Index (Basically it's one in this case) V = Value (Of whatever you're looping) For example: for i,v in pairs(game.Players:GetPlayers()) do v.Character.Humanoid:BreakJoints() end ^ It would grab all the players, and break their joints. What is beside pairs is the value, but in most instances you must use a table to define what is after pairs like: local tab = {game.workspace, game.Players:GetPlayers(), true} [Just an example ^]
Zued
#224377177Tuesday, August 29, 2017 2:55 AM GMT

local Players = game.Players:GetChildren() local Hunger = Instance.new("IntValue") Hunger.Parent = game.Players.LocalPlayer Hunger.Name = "Hunger" Hunger.Value = 100 while true do wait(60) Hunger.Value = Hunger.Value - 5 end
EatCheetos
#224377334Tuesday, August 29, 2017 2:59 AM GMT

Use Zued's code if you're planning to do this in a local script. Otherwise, use for i,v in pairs if you're doing this in a server script.

    of     1