generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Roblox is hating on red NPCs!

Previous Thread :: Next Thread 
SLPM is not online. 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 is not online. Dwarlon
Joined: 18 Jul 2013
Total Posts: 4604
17 Mar 2015 06:42 PM
ROBLOX HOW COULD YOU
Report Abuse
Rustage is not online. Rustage
Joined: 02 Feb 2015
Total Posts: 947
17 Mar 2015 06:45 PM
#stopredism
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
17 Mar 2015 06:48 PM
dont stack ends plz
Report Abuse
Alex645ca is not online. 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 is not online. 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 is not online. 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 is not online. SLPM
Joined: 02 Apr 2010
Total Posts: 33349
17 Mar 2015 07:02 PM
#stopredism
Report Abuse
blooo127127 is not online. blooo127127
Joined: 22 Jul 2010
Total Posts: 403
17 Mar 2015 07:04 PM
You know what line it errors on?
Report Abuse
SLPM is not online. 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
blooo127127 is not online. blooo127127
Joined: 22 Jul 2010
Total Posts: 403
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 is not online. 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
xolbStudios is not online. xolbStudios
Joined: 05 Nov 2009
Total Posts: 504
17 Mar 2015 08:37 PM
stacked ends are an eyesore
Report Abuse
FalconLoverGiraffe is not online. FalconLoverGiraffe
Joined: 24 Jun 2014
Total Posts: 456
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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. SLPM
Joined: 02 Apr 2010
Total Posts: 33349
24 Jun 2015 03:45 PM
It isn't


~~~
Report Abuse
Iaku is not online. Iaku
Joined: 19 Jun 2011
Total Posts: 83
24 Jun 2015 03:49 PM
This is funny af
Report Abuse
SLPM is not online. SLPM
Joined: 02 Apr 2010
Total Posts: 33349
24 Jun 2015 03:49 PM
ikr


~~~
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image