KryptonFX
|
  |
| Joined: 29 May 2015 |
| Total Posts: 98 |
|
|
| 31 Jul 2015 03:29 AM |
| How do you anchor all players when they join the game? |
|
|
| Report Abuse |
|
|
Marzlyn
|
  |
| Joined: 15 Jun 2014 |
| Total Posts: 4431 |
|
|
| 31 Jul 2015 03:34 AM |
1)Change the humanoid's WalkSpeed property to 0 2)Anchor their torso(I think)
Is have grammar booK? send for is me '-' |
|
|
| Report Abuse |
|
|
KryptonFX
|
  |
| Joined: 29 May 2015 |
| Total Posts: 98 |
|
|
| 31 Jul 2015 03:35 AM |
| I mean a script.Also that only works in studio |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2015 03:36 AM |
you do this
for i, v in pairs (game.Players:GetPlayers()) do wait() if v.Character then v.Character.Torso.Anchored = true else wait() end end
or something like that |
|
|
| Report Abuse |
|
|
KryptonFX
|
  |
| Joined: 29 May 2015 |
| Total Posts: 98 |
|
| |
|
|
| 31 Jul 2015 03:42 AM |
well give me the feed, or the output.
what is the error message i wrote it in forum, lemme see, |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2015 03:45 AM |
Its very basic this.
PLACE IT IN A LOOp, SO IT RUNS!
SO DO THIS
while true do wait() for i, v in pairs (game.Players:GetPlayers()) do wait() if v.Character then v.Character.Torso.Anchored = true else wait() end end end
THIS WILL WORK!!! |
|
|
| Report Abuse |
|
|
KryptonFX
|
  |
| Joined: 29 May 2015 |
| Total Posts: 98 |
|
| |
|
Marzlyn
|
  |
| Joined: 15 Jun 2014 |
| Total Posts: 4431 |
|
|
| 31 Jul 2015 03:54 AM |
inefficient let me do this make it in a localscript
local plr = game.Players.LocalPlayer game:GetService("RunService").RenderStepped:connect(function() if not plr.Character then plr.CharacterAdded:wait() end plr.Character.Torso.Anchored = true end)
Is have grammar booK? send for is me '-' |
|
|
| Report Abuse |
|
|
KryptonFX
|
  |
| Joined: 29 May 2015 |
| Total Posts: 98 |
|
|
| 31 Jul 2015 03:55 AM |
| FactualTheory's was better and it runs smooth |
|
|
| Report Abuse |
|
|
Marzlyn
|
  |
| Joined: 15 Jun 2014 |
| Total Posts: 4431 |
|
|
| 31 Jul 2015 03:57 AM |
that's absolutely wrong lol renderstepped has a delay of 1/60 wait() has a delay of 1/30
meaning mine would technically be better
Is have grammar booK? send for is me '-' |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 31 Jul 2015 04:03 AM |
local Players = game:GetService("Players")
Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) char:WaitForChild("Torso").Anchored = true end) end)
-- FTW |
|
|
| Report Abuse |
|
|
Marzlyn
|
  |
| Joined: 15 Jun 2014 |
| Total Posts: 4431 |
|
|
| 31 Jul 2015 04:17 AM |
^
that's also good but chim the problem is if the person resets, therefore it's best to have a loop
Is have grammar booK? send for is me '-' |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 31 Jul 2015 04:25 AM |
Nope, see how the function is connected to the CharacterAdded event?
It runs each time a character is added, when someone resets they die and another character is added.
You should always avoid loops whenever possible.
|
|
|
| Report Abuse |
|
|
|
| 31 Jul 2015 04:28 AM |
This is more efficient because it's not wasting memory space on Players! :D
game.Player.PlayerAdded:connect(function(Player) Player.CharacterAdded:connect(function(Character) Character:WaitForChild("Torso").Anchored = true; end) end)
Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784 |
|
|
| Report Abuse |
|
|
Marzlyn
|
  |
| Joined: 15 Jun 2014 |
| Total Posts: 4431 |
|
|
| 31 Jul 2015 11:37 AM |
| Chim you're one of the most arrogant unprofessional scripted I saw, no offence. |
|
|
| Report Abuse |
|
|
Marzlyn
|
  |
| Joined: 15 Jun 2014 |
| Total Posts: 4431 |
|
|
| 31 Jul 2015 11:38 AM |
You're correct But arrogant asf |
|
|
| Report Abuse |
|
|