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

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

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)

1 comment

0

Please format your code correctly by highlighting all of it and then pressing the blue Lua button!

3 answers

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

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

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)

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