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: tagging humanoid

Previous Thread :: Next Thread 
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
13 Dec 2016 01:08 PM
local damager = script.Parent
local on = damager.On
local player =game.Players.LocalPlayer

script.Parent.Touched:connect(function(hit)
local creator = hit:WaitForChild("Humanoid"):FindFirstChild("creator")
if (creator == nil and on.Value==true) then
local tag = Instance.new('ObjectValue',hit:WaitForChild("Humanoid"))
tag.Name = 'creator'
tag.Value = player
wait(3)
tag:Destroy()
end
end)

why does this not work


Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
13 Dec 2016 01:14 PM
change "local creator" to
local creator = hit:findFirstChild("Humanoid"):findFirstChild("creator")
(doesnt work)





Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
13 Dec 2016 01:30 PM
bump








Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
13 Dec 2016 01:57 PM
BUMP


Report Abuse
KritikalGunzz is not online. KritikalGunzz
Joined: 10 Nov 2013
Total Posts: 1633
13 Dec 2016 02:02 PM
hit will return a #### #### if it hits the player such as arm or his legs so instead use hit.Parent as this is the humanoid
Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
13 Dec 2016 02:41 PM
BUMP not working


Report Abuse
AxonMega is online. AxonMega
Joined: 29 Aug 2014
Total Posts: 2403
13 Dec 2016 02:47 PM
Because the player's body parts don't have humanoids in them. Read the ouput. I hate it when people come to the forum and bump and annoyingly large number of times because they don't know how to read the output.
Report Abuse
Rerumu is not online. Rerumu
Joined: 11 Oct 2014
Total Posts: 950
13 Dec 2016 02:48 PM
http://wiki.roblox.com/index.php?title=Intro_to_Scripting
Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
14 Dec 2016 12:08 PM
hahahahaha, im talking about the npc's humanoid


Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
14 Dec 2016 12:09 PM
i hate it when an idiot pastes something when they dont know what im trying to do


Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
14 Dec 2016 12:25 PM
BUMP, i look at the output everytime i test


Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
14 Dec 2016 01:16 PM
BUMP


Report Abuse
128Gigabytes is not online. 128Gigabytes
Joined: 17 Apr 2014
Total Posts: 3616
14 Dec 2016 01:25 PM
listen to us you foolish human script.Parent.Touched:connect(function(hit) local creator = hit:WaitForChild("Humanoid"):FindFirstChild("creator") hit will be a #### #### body parts do not have a humanoid in them looking at the output won't help if you don't know how to read it.
Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
14 Dec 2016 01:50 PM
listen to me, hit.parent didnt work, tht's why im here scrubs


Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
14 Dec 2016 01:51 PM
m using waitforchild on top of tht


Report Abuse
AxonMega is online. AxonMega
Joined: 29 Aug 2014
Total Posts: 2403
14 Dec 2016 02:21 PM
You are the dictionary definition of an a scrub who only thinks he knows anything and is so annoying that he doesn't even deserve to be helped.
Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
14 Dec 2016 02:49 PM
no u, the 1 who posts hate messages about me on my thread, BUMP, some1 help me


Report Abuse
caca50 is not online. caca50
Joined: 10 Jul 2011
Total Posts: 2037
14 Dec 2016 02:54 PM
script.Parent.Touched:connect(function(part)
local hum = part.Parent:FindFirstChild('Humanoid')
local tag = hum and (hum:FindFirstChild('creator')or Instance.new('ObjectValue',hum).Name='creator') or nil
if tag then
tag.Value = player
game:GetService('Debris'):AddItem(tag,3)
end
end)


Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil)
Report Abuse
caca50 is not online. caca50
Joined: 10 Jul 2011
Total Posts: 2037
14 Dec 2016 02:57 PM
Jk, I can't script.

This works:
script.Parent.Touched:connect(function(part)
local hum = part.Parent:FindFirstChild('Humanoid')
local tag = hum and (hum:FindFirstChild('creator')or Instance.new('ObjectValue',hum)) or nil
if tag then
tag.Name = 'creator'
tag.Value = player
game:GetService('Debris'):AddItem(tag,3)
end
end)



Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil)
Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
15 Dec 2016 11:31 AM
didnt work poopie, BUMP


Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
15 Dec 2016 12:10 PM
BUMP


Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
15 Dec 2016 01:18 PM
BUMP


Report Abuse
Rerumu is not online. Rerumu
Joined: 11 Oct 2014
Total Posts: 950
15 Dec 2016 01:29 PM
Please learn to script first.
THEN ask questions about it.
Report Abuse
kaddad14 is not online. kaddad14
Joined: 13 Apr 2013
Total Posts: 649
15 Dec 2016 01:34 PM
Waiting to know what the output even is... Or if you even tested it with prints.
Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
15 Dec 2016 01:38 PM
waiting for some1 to post something tht helps instead of slander


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