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 » Scripting Helpers
Home Search
 

Re: head item script.

Previous Thread :: Next Thread 
adventurebroemil2 is not online. adventurebroemil2
Joined: 27 Dec 2012
Total Posts: 16124
29 Nov 2013 12:32 PM
Humanoid.health=0 Humanoid.Parent:Addchildren(tool)Humanoid.Parent.tool.name.skull.Humanoid.Parent.Head.Parent=Head



i dont want anyone to make me a script i want someone to tell me whats wrong with it.



Report Abuse
Vaporation is not online. Vaporation
Joined: 08 Jun 2011
Total Posts: 1397
29 Nov 2013 12:39 PM
I don't even understand what you're trying to do.
Report Abuse
Jetta765214 is not online. Jetta765214
Joined: 22 Oct 2008
Total Posts: 1855
29 Nov 2013 12:41 PM
Hook up these on the wiki:

Variables
Assigning, (Maybe called something like Parent)
Instance
Tools


Probably some basic tutorial to mesh everything together.
Report Abuse
adventurebroemil2 is not online. adventurebroemil2
Joined: 27 Dec 2012
Total Posts: 16124
29 Nov 2013 12:42 PM
i want it so that when a player dies another player can pick up their head.




Report Abuse
xWOWZABOYx is not online. xWOWZABOYx
Joined: 05 Aug 2010
Total Posts: 2689
29 Nov 2013 12:42 PM
You're forgetting a lot of capital letters, and your syntax is shocking.

Humanoid.Health=0 Humanoid.Parent:Addchildren(tool)
Humanoid.Parent:findFirstChild(tool).Name = "Skull"
Humanoid.Parent.Head.Parent = Head -- Set head as it's own parent?!

I fixed what I could. Give me the whole script and its intended purpose.

【◄[ϟ]〓☜✪ xWOWZABOYx; FCOM, SQN COM, Scientist, Veteran, Visionary ✪☞〓[ϟ]►】
Report Abuse
xWOWZABOYx is not online. xWOWZABOYx
Joined: 05 Aug 2010
Total Posts: 2689
29 Nov 2013 12:53 PM
Make 2 scripts, Script1 and Script2. Put Script1 inside Script2. Put Script1 inside the player's character via another script. Put a tool named "Skull" inside the ReplicatedStorage folder. make sure it is a tool, not a hopperbin.

--Script1's code:
while script.Parent.Humanoid.Health > 0 do
wait()
end
Skull = script.Parent.Head:Clone(game.Workspace)
Skull.Name = script.Parent.Name.."'s Head"
Skull.Locked = false
script.Script2.Parent = Skull
Skull.Script2.Disabled = false
script:Destroy()

--Script2's code:
function Touched()
if touched.Parent.Humanoid ~= false then
NewSkull = game.ReplicatedStorage.Skull:Clone(game.Players:findFirstChild(touched.Parent.Name).Backpack)
NewSkull.ToolTip = script.Parent.Name
script.Parent:Destroy()
end
script.Parent.Touched:connect(Touched)

and there you go, that's it :)

【◄[ϟ]〓☜✪ xWOWZABOYx; FCOM, SQN COM, Scientist, Veteran, Visionary ✪☞〓[ϟ]►】
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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