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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Help with Humanoid Died

Previous Thread :: Next Thread 
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
14 Sep 2015 11:59 AM

local player = game.Players.LocalPlayer
local char = game.Players.LocalPlayer.Character
local torso = char.Torso


player.CharacterAdded:connect(function(plr)
local humanoid = plr:WaitForChild("Humanoid")
plr.Character.humanoid.Died:connect(function(char)
local ball = Instance.new("Part")
local plrc = torso.CFrame
ball.Shape = "Ball"
ball.BrickColor = BrickColor.new("Electric blue")
ball.CFrame = plrc
ball.Parent = game.Workspace
ball.CanCollide = false
ball.Anchored = true
ball.Size = Vector3.new(12.6, 12.6, 12.6)
ball.Transparency = .5
ball.BottomSurface = "Smooth"
ball.TopSurface = "Smooth"
end)

end)

Its in starterplayer help


http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$245 Tx2,140
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
14 Sep 2015 12:20 PM
67676767676767676



http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$245 Tx2,140
Report Abuse
arda1 is not online. arda1
Joined: 20 Jun 2009
Total Posts: 241
14 Sep 2015 12:21 PM
Try putting it in StarterPlayer > StarterPlayerScripts

://Co-Founder of Origin Productions\\:
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
14 Sep 2015 12:30 PM
nope



http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$245 Tx2,140
Report Abuse
prepareds is not online. prepareds
Joined: 07 Sep 2015
Total Posts: 182
14 Sep 2015 12:41 PM
What exactly are you trying to do here?
Report Abuse
prepareds is not online. prepareds
Joined: 07 Sep 2015
Total Posts: 182
14 Sep 2015 12:45 PM
Put this in a regular script in workspace:


game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
local torso = char:WaitForChild("Torso")
local humanoid = char:WaitForChild("Humanoid")
humanoid.Died:connect(function()
local ball = Instance.new("Part")
local plrc = torso.Position
ball.Shape = "Ball"
ball.BrickColor = BrickColor.new("Electric blue")
ball.Size = Vector3.new(12.6, 12.6, 12.6)
ball.CFrame = CFrame.new(torso.Position)
ball.Parent = game.Workspace
ball.CanCollide = false
ball.Anchored = true
ball.Transparency = .5
ball.BottomSurface = "Smooth"
ball.TopSurface = "Smooth"
end)
end)
end)
Report Abuse
prepareds is not online. prepareds
Joined: 07 Sep 2015
Total Posts: 182
14 Sep 2015 12:46 PM
If you'd like, I can improve that script for you.
Report Abuse
prepareds is not online. prepareds
Joined: 07 Sep 2015
Total Posts: 182
14 Sep 2015 12:48 PM
Use this one, it disappears after death:

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
local torso = char:WaitForChild("Torso")
local humanoid = char:WaitForChild("Humanoid")
humanoid.Died:connect(function()
local ball = Instance.new("Part")
local plrc = torso.Position
ball.Shape = "Ball"
ball.BrickColor = BrickColor.new("Electric blue")
ball.Size = Vector3.new(12.6,12.6,12.6)
ball.CFrame = CFrame.new(torso.Position)
ball.Parent = char
ball.CanCollide = false
ball.Anchored = true
ball.Transparency = .5
ball.BottomSurface = "Smooth"
ball.TopSurface = "Smooth"
end)
end)
end)
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
14 Sep 2015 12:52 PM
Have u tested it?

It doesnt Appear



http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$245 Tx2,150
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
14 Sep 2015 01:27 PM
bamp



http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$245 Tx2,150
Report Abuse
louiskk is not online. louiskk
Joined: 31 Dec 2008
Total Posts: 228
14 Sep 2015 01:29 PM
You put:

plr.Character.humanoid.Died:connect(function(char)

but plr is already the character, you can't get the character of the character.
Report Abuse
louiskk is not online. louiskk
Joined: 31 Dec 2008
Total Posts: 228
14 Sep 2015 01:32 PM
Also, player is the current player, you can't use characteradded with the player. It needs to be in a server script.

local player = game.Players.LocalPlayer
local char = game.Players.LocalPlayer.Character
local torso = char.Torso


game.Players.CharacterAdded:connect(function(plr)
local humanoid = plr:WaitForChild("Humanoid")
plr.humanoid.Died:connect(function(char)
local ball = Instance.new("Part")
local plrc = torso.CFrame
ball.Shape = "Ball"
ball.BrickColor = BrickColor.new("Electric blue")
ball.CFrame = plrc
ball.Parent = game.Workspace
ball.CanCollide = false
ball.Anchored = true
ball.Size = Vector3.new(12.6, 12.6, 12.6)
ball.Transparency = .5
ball.BottomSurface = "Smooth"
ball.TopSurface = "Smooth"
end)

end)
Report Abuse
louiskk is not online. louiskk
Joined: 31 Dec 2008
Total Posts: 228
14 Sep 2015 01:32 PM
Whoops, sorry forget that.
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
14 Sep 2015 01:33 PM
So i have to do...?



http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$245 Tx2,150
Report Abuse
louiskk is not online. louiskk
Joined: 31 Dec 2008
Total Posts: 228
14 Sep 2015 01:37 PM

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(plr)
local humanoid = plr:WaitForChild("Humanoid")
plr.Character.humanoid.Died:connect(function(char)
local ball = Instance.new("Part")
local plrc = torso.CFrame
ball.Shape = "Ball"
ball.BrickColor = BrickColor.new("Electric blue")
ball.CFrame = plrc
ball.Parent = game.Workspace
ball.CanCollide = false
ball.Anchored = true
ball.Size = Vector3.new(12.6, 12.6, 12.6)
ball.Transparency = .5
ball.BottomSurface = "Smooth"
ball.TopSurface = "Smooth"
end)
end)
end)

Put that in a server script and then whenever someone joins or respawns your code will run.
Report Abuse
louiskk is not online. louiskk
Joined: 31 Dec 2008
Total Posts: 228
14 Sep 2015 01:38 PM
Replace this line:

plr.Character.humanoid.Died:connect(function(char)

with this:

plr.humanoid.Died:connect(function(char)


Sorry for all the posts.
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
14 Sep 2015 01:52 PM
mm thats already

its in Serverscriptstorage

Still Doesnt appear at all



http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$245 Tx2,150
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