|
| 07 Dec 2015 10:29 PM |
| Is there a way to make a player invincible without FFs and without changing a player's health to math.huge? |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 10:36 PM |
| Yeah, you could modify the scripts that are doing damage. |
|
|
| Report Abuse |
|
|
| |
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 07 Dec 2015 10:45 PM |
| tURN THE PLlAYER INTO A BLOCK |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 10:47 PM |
| The player can't be damaged if he is kicked! Kick him! |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 10:49 PM |
1. Have a BoolValue in the player. 2. Make the Damage script check if its true, if so, then do the damage, else, don't do the damage. 3. Then changed the Bool's value to meet your needs.
[Work not tested, not bested.] |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 10:52 PM |
| But you see, my game is like almost done and it would take FOREVER to change all the scripts that damage .-. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 10:53 PM |
| This is why ModuleScripts are awesome. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 10:56 PM |
^^^^^^^^^^^
If you had a module script, you could define a function such as:
function module.DealDamage(player, amount) player.Character.Humanoid:TakeDamage(amount) end
and if you wanted to make the player invincible, you could have some sort of bool value in their player that marks invincibility:
function module.DealDamage(player, amount) if player.IsInvincible.Value then return end player.Character.Humanoid:TakeDamage(amount) end
and now in all the gun scripts, you could call
module.DealDamage(some_player, 50)
and you can edit the DealDamage function and have it apply to all guns |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 11:08 PM |
In SAOR (Game I'm in charge of developing) I have a central script with all the health related stuff, and 1 script to control the damage output of all weapons equipped (Given as I made my own tool system) and that 1 script will always check for the Invulnerability bool within the Player's model. Easy as that.
[Work not tested, not bested.] |
|
|
| Report Abuse |
|
|
| |
|
Belleq
|
  |
| Joined: 05 Jun 2014 |
| Total Posts: 21703 |
|
|
| 07 Dec 2015 11:12 PM |
| @ben that also disables reset tho .. |
|
|
| Report Abuse |
|
|
Belleq
|
  |
| Joined: 05 Jun 2014 |
| Total Posts: 21703 |
|
|
| 07 Dec 2015 11:13 PM |
| and will also most likely result in a lot of errors in the damage scripts |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 11:15 PM |
| Then if he doesn't want that then he is going to have to do what everyone else said, edit the script |
|
|
| Report Abuse |
|
|
Belleq
|
  |
| Joined: 05 Jun 2014 |
| Total Posts: 21703 |
|
|
| 07 Dec 2015 11:16 PM |
| I still don't understand why he wouldn't want math.huge lol |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 11:36 PM |
First of all, Hi Belleq. Second, I don't want math.huge because it doesn't look as cool Lmfao. But anyways, I was planning on making a damage module script but I guess I forgot to. Now that you reminded me, i guess I will. That will probably be the best way. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 11:37 PM |
| Also, should i be using remote functions or module scripts? |
|
|
| Report Abuse |
|
|
hkep
|
  |
| Joined: 19 Jul 2014 |
| Total Posts: 550 |
|
|
| 07 Dec 2015 11:54 PM |
Honestly module scripts are for keeping scripts shorter, because you could technically define everything in a module script in all the scripts that require it. But if multiple scripts require it, it is a lot of writing. Plus, module scripts can be used to create settings for other scripts to use.
RemoteFunctions take tuple arguements and return an output value. I don't believe that returning a function works well. But returning simple things is safe.
If you wanted to, you could make a local script use a remote function to get the damage to deal to another player. But the ping would cause a large delay in timing.
|
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 04:08 PM |
I made an anti haxor module script that, when called with 2 arguments (The player and the damage.) it applies the damage and compares it to the server max damage, if it exceeds it, it kicks the player carried with the argument, and returns their UserId to be later added to a table. So yes, Module Scripts can return values from functions rather easily.
[Work not tested, not bested.] |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 08:58 PM |
| Why would you need an anti haxor script if your game is FilteringEnabled? |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 08:59 PM |
@Crazy
Change the name of their Humanoid, then all the scripts won't be able to find it. Problem solved. |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 09:45 PM |
| And every single script will break and be unable to continue... |
|
|
| Report Abuse |
|
|
|
| 09 Dec 2015 12:50 AM |
Whether or not you use FE you can still change values in a game and there are other exploits that are possible. So it wouldn't matter. Plus its fun to kick exploiters OuO
[Work not tested, not bested.] |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 09 Dec 2015 08:02 AM |
| I'm still with Dr or Jarod. |
|
|
| Report Abuse |
|
|