SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
|
| 17 Mar 2015 06:40 PM |
https://twitter.com/shortPinman/status/577976238062641152
I tried so many things, every color NPC has a perfectly working damage script except red. The only differences between the NPCs are the color. I even tried taking my red npc and changing color to yellow while keeping the name "Red Dude". It began working.
How is this possible? lol
Damage script =
local Debounce = Instance.new("BoolValue") Debounce.Name = "Debounce" Debounce.Value = false local DMG = 35 local CoolDown = .5 local model = script.Parent local children = model:GetChildren() for i=1, #children do if children[i]:IsA("BasePart") then children[i].Touched:connect(function(hit) local part = hit local human = hit.Parent:FindFirstChild("Humanoid") if human then Damage(human) end end) end end function Damage(human) if human then local player = game.Players:GetPlayerFromCharacter(human.Parent) if player then if not player:FindFirstChild("Debounce") then local clone = Debounce:Clone() clone.Parent = player end if player:FindFirstChild("Debounce") and player.Debounce.Value == false then player.Debounce.Value = true human:TakeDamage(DMG) wait(CoolDown) player.Debounce.Value = false end else if not human.Parent:FindFirstChild("Debounce") then local clone = Debounce:Clone() clone.Parent = human.Parent end if human.Parent:FindFirstChild("Debounce") and human.Parent.Debounce.Value == false then human.Parent.Debounce.Value = true human:TakeDamage(DMG*5) model:Destroy() human.Parent.Debounce.Value = false end end end end |
|
|
| Report Abuse |
|
|
Dwarlon
|
  |
| Joined: 18 Jul 2013 |
| Total Posts: 4604 |
|
| |
|
Rustage
|
  |
| Joined: 02 Feb 2015 |
| Total Posts: 947 |
|
| |
|
| |
|
Alex645ca
|
  |
| Joined: 02 Feb 2009 |
| Total Posts: 2531 |
|
|
| 17 Mar 2015 06:49 PM |
| Maybe try making it a different shade of red until you figure out the more specific details? |
|
|
| Report Abuse |
|
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
|
| 17 Mar 2015 06:52 PM |
| Okay, watch it just do it to all reds lol |
|
|
| Report Abuse |
|
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
|
| 17 Mar 2015 06:58 PM |
| Okay it only does it to Bright red NPCs.... Roblox is particularly hating on those ones. |
|
|
| Report Abuse |
|
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
| |
|
|
| 17 Mar 2015 07:04 PM |
| You know what line it errors on? |
|
|
| Report Abuse |
|
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
|
| 17 Mar 2015 07:05 PM |
| It doesn't error. It just doesn't injure players like it's supposed to. Does for all other colored npcs. Never says an error in output. |
|
|
| Report Abuse |
|
|
|
| 17 Mar 2015 07:11 PM |
| Sounds like something very simple you may be over looking. Nobody here can help you without a full look at the model or thing you are working with. I'd double check all names/variable names to see if anything pulls a name from the wrong place. |
|
|
| Report Abuse |
|
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
|
| 17 Mar 2015 08:21 PM |
| I assure you, there's nothing specifically preventing the damage script from doing 1/2 of its primary function just because the color of the NPC is Bright red. It still damages the crystal when it touches it, but doesn't damage players. If I duplicate it then change color of body parts to Bright yellow while leaving everything else the same then it begins damaging players again. |
|
|
| Report Abuse |
|
|
|
| 17 Mar 2015 08:37 PM |
| stacked ends are an eyesore |
|
|
| Report Abuse |
|
|
|
| 17 Mar 2015 09:08 PM |
It is probably because ROBLOX automatically thinks red=blood.
And they only censor the red in ROBLOX not in decals |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 17 Mar 2015 09:23 PM |
| OP is probably using some kind of FMd weapon that hard cored against damaging anyone on the same (Bright Red) team. |
|
|
| Report Abuse |
|
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
|
| 17 Mar 2015 09:53 PM |
| @Casualist, I am not using any free modeled weapons... Tell me where in this damage script there has something to do with team color. This is the damage script that causes the function the npcs use to damage things. |
|
|
| Report Abuse |
|
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
|
| 17 Mar 2015 09:55 PM |
| Basically the thing dealing the damage is red, not the thing receiving it. |
|
|
| Report Abuse |
|
|
Alex645ca
|
  |
| Joined: 02 Feb 2009 |
| Total Posts: 2531 |
|
|
| 18 Mar 2015 04:49 PM |
| Use find all and search for 'Bright red', there's probably something going on somewhere. |
|
|
| Report Abuse |
|
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
|
| 18 Mar 2015 05:36 PM |
| There's no "Bright red" in this script. |
|
|
| Report Abuse |
|
|
Alex645ca
|
  |
| Joined: 02 Feb 2009 |
| Total Posts: 2531 |
|
|
| 24 Jun 2015 11:06 AM |
| Find all specifically searches every script in your level; it might be some other script you've forgotten about. |
|
|
| Report Abuse |
|
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
| |
|
Iaku
|
  |
| Joined: 19 Jun 2011 |
| Total Posts: 83 |
|
| |
|
SLPM
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 33349 |
|
| |
|