Hi, I’ll get straight to the point.
I’m trying to cause Immortality/Infinite Health upon Triggering a Proximity Prompt, or “Eating a pill.”
I’m not sure what the problem is.
Here’s what I’ve got so far.
local pill = script.Parent.Parent
pill.EatPrompt.TriggerEnded:Connect(function(player)
-- I don't know if I can reference the player using ^ that
local Health = player.Character:WaitForChild("Humanoid").Health
local MaxHealth = player.Character:WaitForChild("Humanoid").MaxHealth
-- Setting the health to Infinite
MaxHealth = math.huge
Health = math.huge
pill:Destroy()
-- Making sure the health is set to Infinite.
print(Health)
end)
I have many speculations, most of which hadn’t worked as I’ve tried setting health to one billion instead of infinite, using FindFirstChild instead of WaitForChild, Referencing the player in a different way.
But no matter what the health never changes. ( I have a strong feeling I’m not referencing the player right.)