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

How do i make my plasma ball to not harm its user?

Asked by 8 years ago

i want to make it so that my plasma ball doesn't explode kill its user or the person who is using it, i tried some methods of my own but they did not work here is the script

function onTouched(hit) exp = Instance.new("Explosion") exp.Position=script.Parent.Position exp.Parent=workspace script.Parent:remove() end script.Parent.Touched:connect(onTouched)

0
Please format your code correctly by highlighting all of it and then pressing the blue Lua button! User#9949 0 — 8y

3 answers

Log in to vote
1
Answered by 8 years ago

Once you make the explosion, you could put a forcefield on the player.

Ad
Log in to vote
0
Answered by 8 years ago

Maybe make it so when you fire your player goes into god mode until the attack finishes?

Log in to vote
0
Answered by 8 years ago

i want the user of the plasma-ball to be able to be harmed by another users plasma-ball while being immune to their own

this is the script in lua-form


function onTouched(hit) exp = Instance.new("Explosion") exp.Position=script.Parent.Position exp.Parent=workspace script.Parent:remove() end script.Parent.Touched:connect(onTouched)

Answer this question