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: help....

Previous Thread :: Next Thread 
KryptonFX is not online. 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 is not online. 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 is not online. 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
FactualTheory is not online. FactualTheory
Joined: 10 Sep 2013
Total Posts: 1365
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 is not online. KryptonFX
Joined: 29 May 2015
Total Posts: 98
31 Jul 2015 03:38 AM
doesnt work
Report Abuse
FactualTheory is not online. FactualTheory
Joined: 10 Sep 2013
Total Posts: 1365
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
FactualTheory is not online. FactualTheory
Joined: 10 Sep 2013
Total Posts: 1365
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 is not online. KryptonFX
Joined: 29 May 2015
Total Posts: 98
31 Jul 2015 03:48 AM
THANKS IT WORKED
Report Abuse
Marzlyn is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
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 is not online. 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 is not online. Marzlyn
Joined: 15 Jun 2014
Total Posts: 4431
31 Jul 2015 11:38 AM
You're correct
But arrogant asf
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