Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

God script doesn't work? *HELP*

I'm attempting to create a script so that players on a certain team get "godded". However, the script isn't working and there are no errors in output.

I added the while loop because people will be changing teams all the time.

Any help would be appreciated.

while wait() do 
	for i,v in next, game.Players:GetChildren() do
		if v.TeamColor == "White" then 
		k = Workspace:FindFirstChild(v.Name,true)
		if k then
		k.MaxHealth = math.huge
	end 
	end 
end
end

3 comments

0

Try setting MaxHealth to 0. If that doesn't work, take Kohl's Admin and inspect the script.

0

Checked it. No errors are shown.

0

Inspect Kohl's. Use the find function in studio. That's Command + F on Mac, and Control + F for Windows, while looking at a script.

1 answer

while wait() do 
    for i,v in next, game.Players:GetChildren() do
        if v.TeamColor == "White" then 
        k = Workspace:FindFirstChild(v.Name,true)
        if k and k:FindFirstChild("Humanoid") then
        k.Humanoid.MaxHealth = math.huge
    end 
    end 
end
end

Try that

This discussion is preserved as it was. New answers, comments, and votes are closed.