What I mean by that is; when the game starts, everyone will spawn in a lobby. They will be in the lobby for a specific time (27 seconds), and then after 27 seconds I want them to have 100 hp. Please help! Thanks!
This is a easy script.
wait(.2) -- Making sure the character loads. local ply = game.Players.LocalPlayer -- Getting the player local char = ply.Character -- Getting the character. You could also do ply:WaitForChild("Character") local hum = char:FindFirstChild("Humanoid") -- Getting the humanoid hum.MaxHealth = math.huge -- Giving inf maxhealth hum.Health = hum.MaxHealth -- Giving inf health wait(27) hum.MaxHealth = 100 -- Reverting health to 100
There you go ;)
This should do it, but you will have to do the part where when they enter the lobby it works
local Player = game:GetService'Players'.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Human = Character:WaitForChild("Humanoid") Human.MaxHealth and Human.Health = 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 -- This is INF wait(27) Human.MaxHealth and Human.Health = 100
Closed as Not Constructive by OldPalHappy
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?