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: How do I create an AFK script?

Previous Thread :: Next Thread 
jki is not online. jki
Joined: 23 Aug 2008
Total Posts: 4629
11 Sep 2013 06:29 AM
Okay, so I'd like to create an AFK script where a user says AFK/afk and they get teleported and FF'ed to the area thats for AFK/afk users. Also, when they say back or BACK they get teleported back to the baseplate, how can I do this?
Report Abuse
DragonODeath is not online. DragonODeath
Joined: 02 May 2011
Total Posts: 1252
11 Sep 2013 06:30 AM
Using the Chatted event. Using CFrame for torsos/MoveTo method for models. Instance a new force field into the character. Finding the baseplate. string:lower.
You have to learn the coding yourself.
Report Abuse
sam8985 is not online. sam8985
Joined: 12 Nov 2011
Total Posts: 582
11 Sep 2013 07:11 AM
local ToBrick = workspace["NameOfAFKBrick"] --The name of the brick you want afk people to be teleported to
local ReturnBrick = workspace["ReturnBrick"]--Name of brick to return to. If you want them to be exactly where they were before they went AFK, tell me.
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if msg:upper() == "AFK" then
plr.Character.Torso.CFrame = ToBrick.CFrame + Vector3. new(0,3,0)
elseif msg:lower() == "back" then
plr.Character.Torso.CFrame = ToBrick.CFrame + Vector3. new(0,3,0)
end
end)
end)
Report Abuse
Infocus is not online. Infocus
Joined: 28 Apr 2011
Total Posts: 8022
11 Sep 2013 07:14 AM
Another way for people to cheat. Use the Move event of the mouse to return them to original position.
Report Abuse
DragonODeath is not online. DragonODeath
Joined: 02 May 2011
Total Posts: 1252
11 Sep 2013 07:14 AM
aww, it's FreeToTake's descendant.
Report Abuse
Infocus is not online. Infocus
Joined: 28 Apr 2011
Total Posts: 8022
11 Sep 2013 07:20 AM
Wot
Report Abuse
jki is not online. jki
Joined: 23 Aug 2008
Total Posts: 4629
11 Sep 2013 07:29 AM
No need, I scripted my own AFK system, it FF's you when you click the button etc.
Report Abuse
Infocus is not online. Infocus
Joined: 28 Apr 2011
Total Posts: 8022
11 Sep 2013 07:30 AM
'Made'

You mean FM?
I bet you can't instance a ff
Report Abuse
jki is not online. jki
Joined: 23 Aug 2008
Total Posts: 4629
11 Sep 2013 07:43 AM
if (h:FindFirstChild("ForceField")~=nil) then
h.ForceField:Remove()
end
Report Abuse
DragonODeath is not online. DragonODeath
Joined: 02 May 2011
Total Posts: 1252
11 Sep 2013 08:04 AM
How inefficient.
1. No need for parentheses at line 1.
2. No need for ~= nil at line 1.
3. Remove() is deprecated. Use Destroy() instead.
Report Abuse
funnymouse7 is not online. funnymouse7
Joined: 17 Mar 2011
Total Posts: 1741
11 Sep 2013 08:30 AM
I doubt he even made that just copied it off the FM
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