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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|