Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make players god and can't be damaged/exploded?

Asked by 6 years ago

I want the players in my game to be godded & non-explodable.

0
You could use this to provide inmunity from damage & explosions. http://wiki.roblox.com/index.php?title=API:Class/ForceField iDarkGames 483 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

Here are some examples.

Forcefield:

plr = game.Players.LocalPlayer

local ff = Instance.new("ForceField")
ff.Parent = plr.Character

Renaming humanoid:

plrname = game.Players.LocalPlayer.Name
game.Players:WaitForChild(plrname)
game.Workspace:WaitForChild(plrname)
game.Workspace[plrname].Humanoid.Name = "GodMode"

Changing the health:

plrname  = game.Players.LocalPlayer.Name
game.Players:WaitForChild(plrname)
game.Workspace:WaitForChild(plrname)
game.Workspace[plrname].Humanoid.MaxHealth = 999999999  --or math.huge(makes it inf)
game.Workspace[plrname].Humanoid.Health = 999999999  --or math.huge(makes it inf)
0
You can still explode if you use the last 2 MiracleDev 15 — 6y
Ad
Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

a few ways to do this are:

rename the humanoid

set maxhealth to math.huge

add a forcefield

Answer this question