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

Can anyone help me script my nuke so it only destroys blocks and not myself?

Asked by 10 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

I have tried finding out what sections of script connect to make ME explode but to no avail. It is 31skinny's. Can anyone help me?

0
I don't know how to script... bnl1244 0 — 10y

1 answer

Log in to vote
1
Answered by
MixCorp 70
10 years ago

The only way to really stop an explosion from killing you is FF. Try this

AntiNukes={"bnl1244","MixCorp","OtherGuys"} --Names of people that cant be killed by nukes.

function Nuke()

for i,v in pairs(game.Players:children()) do
for i = 1,#AntiNukes do if AntiNukes[i]:lower() == v.Name:lower() then
ff = Instance.new("ForceField",v.Character) --You may need to lower case the Field. Not sure.
end
end
end

--All OF Your Code

for i,v in pairs(game.Players:children()) do
for i,char in pairs(v.Character:children()) do
if v.className == "ForceField" then --Again may need to lower Field, Not sure exact instance name.
v:remove()
end
end
end
end

If you find yourself needing more help PM me @MixCorp

Ad

Answer this question