someone for the love of god help me I've had 150 million people look at this and none of them can figure out what's going on
Errors are on lines 16 on HungerDmg and ThirstDmg
Stats
local config = script.Configuration -- locate config folder
local drain = script.Drain -- locate drain script
local checkHunger = script.HungerDmg -- locate hunger damage script
local checkThirst = script.ThirstDmg -- locate thirst damage script
local playerID = script.FuckRoblox
game.Players.PlayerAdded:Connect(function(plr) -- when player joins
playerID.Value = plr.UserId
local leaderstats = Instance.new("Folder") -- create folder
leaderstats.Name = "PlayerStats" -- name folder "PlayerStats"
leaderstats.Parent = plr -- Set playerstat folder parent to the player
local MaxHunger = Instance.new("NumberValue") --create max hunger value
MaxHunger.Name = "MaxHunger" -- name it
MaxHunger.Parent = leaderstats -- parent it to PlayerStats
MaxHunger.Value = 100 -- set value to 100
local hunger = Instance.new("NumberValue")
hunger.Name = "Hunger" -- name it
hunger.Parent = leaderstats -- parent it to PlayerStats
hunger.Value = 5-- set value to max value
local MaxThirst = Instance.new("NumberValue")
MaxThirst.Name = "MaxThirst" -- name it
MaxThirst.Parent = leaderstats -- parent it to PlayerStats
MaxThirst.Value = 100 -- set value to 100
local thirst = Instance.new("NumberValue")
thirst.Name = "Thirst" -- name it
thirst.Parent = leaderstats -- parent it to PlayerStats
thirst.Value = MaxThirst.Value -- set value to max value
end)
drain.Disabled = false -- start drain
checkHunger.Disabled = false
checkThirst.Disabled = false
Drain - disabled by defoolt
local config = script.Parent.Configuration -- config folder
local tbr = config.TimeBetweenReduction-- time between thirst reduction
game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = plr:WaitForChild("PlayerStats") -- define player stats folder
thirstStat = leaderstats:WaitForChild("Thirst") -- define thirst stat
hungerStat = leaderstats:WaitForChild("Hunger") -- yare yare daze
end)
while true do
wait(tbr.Value)
if thirstStat.Value > 0 then -- if stat is more than 0 then drain
thirstStat.Value = thirstStat.Value - 1 -- drains a certain amount of the stat
end
if hungerStat.Value > 0 then -- if stat is more than 0 then drain
hungerStat.Value = hungerStat.Value - 1 -- drains a certain amount of the stat
end
end
HungerDmg - disabled by defoolt
local config = script.Parent.Configuration -- locate config folder where dem shiz are
local thirstDamage = config.ThirstDamage -- how much damage thirst does
local hungerDamage = config.HungerDamage -- how much damage hunger does
local playerID = script.parent.FuckRoblox
game.Players.PlayerAdded:Connect(function(player)
script.Parent.FuckRoblox.Value = player.UserId
print("Player ID is: "..script.Parent.FuckRoblox.Value)
end)
local plr = game:GetService("Players"):GetPlayerByUserId(script.Parent.FuckRoblox.Value)
local PlrStats = plr:FindFirstChild("PlayerStats") -- locate player stats folder
local hungerStat = PlrStats:WaitforChild("Hunger") -- locate hunger stat within player stats
local h = plr.Character.Humanoid -- assign humanoid
while true do
wait(3) -- Time between damage
if hungerStat.Value <= 0 and h.Health > 0 then -- if thirst is less or equal to 0 and player hp is greater than 0
h:TakeDamage(hungerDamage.Value) --Player takes the defined amount of damage
end
end
ThirstDmg - disabled by defotueotl
local config = script.Parent.Configuration -- locate config folder where dem shiz are
local thirstDamage = config.ThirstDamage -- how much damage thirst does
local hungerDamage = config.HungerDamage -- how much damage hunger does
local playerID = script.parent.FuckRoblox
game.Players.PlayerAdded:Connect(function(player)
script.Parent.FuckRoblox.Value = player.UserId
print("Player ID is: "..script.Parent.FuckRoblox.Value)
end)
local plr = game:GetService("Players"):GetPlayerByUserId(script.Parent.FuckRoblox.Value)
local PlrStats = plr:FindFirstChild("PlayerStats") -- locate player stats folder
local thirstStat = PlrStats:WaitforChild("Thirst") -- locate hunger stat within player stats
local h = plr.Character.Humanoid -- assign humanoid
while true do
wait(3) -- Time between damage
if thirstStat.Value <= 0 and h.Health > 0 then -- if thirst is less or equal to 0 and player hp is greater than 0
h:TakeDamage(hungerDamage.Value) --Player takes the defined amount of damage
end
end

3 comments
i dont even know what to say anymore ive made such a messy shit show of doe ill probably faint soon
There's no player stats in a playerID
but htere is?