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: How to access character?

Previous Thread :: Next Thread 
iSpooki is not online. iSpooki
Joined: 08 Feb 2011
Total Posts: 117
25 Sep 2016 04:04 AM
I have been trying everything, but I can't figure out how to access the character. What I want to do is remove the legs of the character when they join the game. I know I have to do something with PlayerAdded, but I don't know exactly what to do. So that is why I came to this forum for help.

Thank You,
iSpooki


Report Abuse
FPSPwnz0r is not online. FPSPwnz0r
Joined: 27 Jun 2011
Total Posts: 2737
25 Sep 2016 04:17 AM
uhhh off the top of my head

game.Players.PlayerAdded:connect(function(player))
local character = player.Character
right = character:findFirstChild("Right Leg")
right:Destroy()
left = character:findFirstChild("Left Leg")
left:Destroy()
end

idk if that'll work, and if it does there's more efficient ways


Report Abuse
Mitko0o1 is not online. Mitko0o1
Joined: 30 Nov 2010
Total Posts: 5725
25 Sep 2016 04:20 AM
if you want to get it from an event then do this:

game:GetService("Plyers").PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild("Right Leg"):Destroy()
character:WaitForChild("Left Leg"):Destroy()
end)
end)

otherwise you can use this:

player = game.Players.Mitko0o1
character = player.Character or player.CharacterAdded:wait() -- since you cannot get the character with :WaitForChild()

character:WaitForChild("Right Leg"):Destroy()
character:WaitForChild("Left Leg"):Destroy()
Report Abuse
iSpooki is not online. iSpooki
Joined: 08 Feb 2011
Total Posts: 117
25 Sep 2016 04:30 AM
02:27:57.353 - Workspace.Script:3: unexpected symbol near ')'

That is what I got from the output, and nothing happened to character. I tried fixing it, but honestly I am not really an advanced scripter. I know a few things, but I can't figure out what the problem is.


Report Abuse
iSpooki is not online. iSpooki
Joined: 08 Feb 2011
Total Posts: 117
25 Sep 2016 04:31 AM
^^ That reply was meant for FPSPwnz0r


Report Abuse
xxsquidisrarexx is not online. xxsquidisrarexx
Joined: 06 Feb 2014
Total Posts: 118
25 Sep 2016 04:31 AM
game.Players.xxsquidisrarexx.Humanoid = iscancer = true, IsScriptFAKE = Yes cus hes cancer
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