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

How to make a script to inflict harm on the wielder?

Asked by 10 years ago

So basically, I have this sword which is 'over-corrupt' meaning it's so corrupt it hurts the person who is handling it...

I want it to hurt the player like slowly but not so slow they regenerate health or anything, just so they'll notice after around 5 seconds they're somehow getting hurt, and in this case poisoned.

I'm not sure why this won't work but can someone explain and fix it? Oh and would I need a bit to also make sure they don't regenerate health? Because I thought you can only regenerate health after a certain time of no damage, unless you have a gear - like the regeneration coil.

01-- list of account names allowed to go through the door.
02permission = { "MasterPoke99" } -- This is how many people can still get through, so u don't have to change shirts. You can also have another friend here. -EDIT
03 
04-- TextureId of the VIP shirt.
05texture = "http://www.roblox.com" -- EDIT
06function checkOkToLetIn(name)
07    for i = 1,#permission do
08        -- convert strings to all upper case, otherwise we will let in
09        -- "Username" but not "username" or "uSERNAME"
10        if (string.upper(name) == string.upper(permission[i])) then return true end
11    end
12    return false
13end
14 
15local Door = script.Parent
View all 51 lines...

Oh and I forgot to mention, I only want some people to be 'immune' to it's 'over-corruption'

So the script kinda also sums up what I want for it to do... Oh and where should I put it - Because at the moment it's in the handle.

Thanks... Oh and maybe change the long list into a loop? -- I don't know how :3

Answer this question