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: the player model is in workspace?

Previous Thread :: Next Thread 
snydemand is not online. snydemand
Joined: 15 Mar 2010
Total Posts: 11
05 Jul 2014 12:57 AM
i have figured out that the player(in that case me)when playing, the model is in workspace. seems logical, but what isent logical is that i have a really hard time doing anything with that knowledge. i have tried since yesterday to make all players that join my game run faster. but i cant reach "Humanoid" in thair player.

any help would be apriciated :)
Report Abuse
WishNite is not online. WishNite
Joined: 11 Feb 2009
Total Posts: 15828
05 Jul 2014 01:01 AM
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(char)
char.Humanoid.WalkSpeed = 16
end)
end)

if you have any questions feel free to post
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
05 Jul 2014 01:05 AM
Yes, the "PlayerModel" is placed in workspace because the PlayerModel holds all of the limbs clothing data and the "Humanoid" and various other things,
anyway, try something like this,
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
Character.Humanoid.WalkSpeed = NumberHere
end)
end)
More information on these can be found here:
http://wiki.roblox.com/index.php?title=WalkSpeed_%28Property%29
http://wiki.roblox.com/index.php?title=PlayerAdded_%28Event%29
http://wiki.roblox.com/index.php/CharacterAdded_%28Event%29
And for looping through players already in the game,
http://wiki.roblox.com/index.php?title=Loops
There you go.
Report Abuse
snydemand is not online. snydemand
Joined: 15 Mar 2010
Total Posts: 11
05 Jul 2014 01:55 AM
thanks for the help guys, really apriciated :)

but um... can u tell me if there is a way to get Player.Name

i have tried:

local localp = p.Name
if game.Players.localp.TeamColor == "Birght blue" then
print("yes")
elseif game.Players.localp.TeamColor == "Bright red" then
print("no")
else
print("nil")
end

but this returns:

localp is not a valid member of Players

can i take the variable and maybe "toString" or something?

Thanks again
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
05 Jul 2014 02:00 AM
Place this inside of a LocalScript and place the LocalScript in the starterpack,
Player = game.Players.LocalPlayer
if Player.TeamColor == BrickColor.new("Bright blue") then
print("Yes")
elseif Player.TeamColor == BrickColor.new("Bright red") then
print("No")
else
print("nil")
end
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
05 Jul 2014 02:03 AM
Also, when you're checking the TeamColor of a team you have to use something like,
if Player.TeamColor == BrickColor.new("TeamColorHere") to check properly.
Additionally, the game didn't understand who "localp" is, I would suggest you read the article on loops and use game.Players:GetChildren() to get the players.
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