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: CTRL + C

Previous Thread :: Next Thread 
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
04 Aug 2012 01:00 AM
Is there a way to do CTRL + C in a script?I want to make a tool in my place able to CTRL + C so I'm able to build with my friends and save.
Report Abuse
Deviser is not online. Deviser
Joined: 05 May 2011
Total Posts: 344
04 Aug 2012 01:03 AM
Sure you can!!

Here's how I use it:

print("Hello World!")
^
|
|
CTRL+C
|
|
V
CTRL+V

print("Hello World!")
Report Abuse
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
04 Aug 2012 01:04 AM
You can do it in Edit or Build mode, but not in game.
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
04 Aug 2012 01:11 AM
Damn it
Report Abuse
redpenchill is not online. redpenchill
Joined: 24 Jul 2008
Total Posts: 450
04 Aug 2012 01:21 AM
if i'm understanding correctly you want a tool that will copy an item, correct?

You can make this by using the :Clone() method.
Report Abuse
redpenchill is not online. redpenchill
Joined: 24 Jul 2008
Total Posts: 450
04 Aug 2012 01:22 AM
Also, why don't you just make a personal server? lol
Report Abuse
luke111000 is not online. luke111000
Joined: 26 Apr 2009
Total Posts: 1853
04 Aug 2012 01:29 AM
local plr = game.Players.LocalPlayer

function KeyDown(key)
key:lower()
if key == "q" then
game:ServerSave() -- Works.
end
end

function onSelected(mouse)
mouse.KeyDown:connect(KeyDown)
end
script.Parent.Selected:connect(onSelected)
Report Abuse
redpenchill is not online. redpenchill
Joined: 24 Jul 2008
Total Posts: 450
04 Aug 2012 01:40 AM
Does game:ServerSave() only work in your own place?
Report Abuse
luke111000 is not online. luke111000
Joined: 26 Apr 2009
Total Posts: 1853
04 Aug 2012 01:44 AM
Well, kinda. You can't do game:ServerSave on it' own. I was giving a demo.
But this will work

placeID = 1
game:SetServerSaveUrl("http://www.roblox.com/Data/Upload.ashx?assetid="..placeID)
game:ServerSave()
Report Abuse
luke111000 is not online. luke111000
Joined: 26 Apr 2009
Total Posts: 1853
04 Aug 2012 02:02 AM
Nevermind. It only works in plugins.
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
04 Aug 2012 07:42 AM
:U thanks thought.I hope roblox make it so the creator can save :(
Report Abuse
doneyes is online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
04 Aug 2012 07:43 AM
You can always make a tool that copies and pastes.
Report Abuse
rsethc is not online. rsethc
Joined: 23 Jan 2011
Total Posts: 333
04 Aug 2012 07:48 AM
You can use the bytecode equivalent of the Control key with "C"... in something like this:

--mouse needs to be defined. perhaps use a tool equip function to define it.
--CtrlC function is where u put stuff'z in.
function CtrlC()
--do stuff
end
C = false
Ctrl = false
function NewKey(key)
if string.lower(key) == "c" then -- don't know if string.lower is necessary.
C = true
elseif key == --[[I don't know the bytecode for Ctrl key. Try crazyman32's Useful Key Bytecodes list.]] then
Ctrl = true
end
if C and Ctrl then
C = false
Ctrl = false
CtrlC()
end
end
function KeyOff(key)
if string.lower(key) == "c" then -- don't know if that's necessary
C = false
elseif key == --[[Ctrl byte code string]] then
Ctrl = false
end
end
mouse.KeyDown:connect(NewKey)
mouse.KeyUp:connect(KeyOff)
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
04 Aug 2012 07:50 AM
But can it copy things like using ctrl + c in studio :P?
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