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: I need somone to write a **SIMPLE** script for me.

Previous Thread :: Next Thread 
tanlolol12345 is not online. tanlolol12345
Joined: 20 Jan 2012
Total Posts: 20664
13 Apr 2014 04:30 PM
"Simple" depends on your point of view of scripting
so, I just need a script that when you press a button on your keyboard, it activates something. I am not a scripting master , but I just need this cone component for my script so that I can make a weapon that can change from super mode to normal mode.
Report Abuse
tanlolol12345 is not online. tanlolol12345
Joined: 20 Jan 2012
Total Posts: 20664
13 Apr 2014 04:34 PM
Anyone?
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
13 Apr 2014 04:34 PM
--localscript
player = game:GetService('Players'):WaitForChild('LocalPlayer')
mouse = player:GetMouse()
mouse.KeyDown:connect(function(key)
--do stuff
end)

#nerdsunited
Report Abuse
sidekick601 is not online. sidekick601
Joined: 27 Feb 2012
Total Posts: 8734
13 Apr 2014 04:35 PM
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local open = false

Mouse.KeyDown:connect(function(k)
k = k:lower()
if k == "r" then --change r to whatever key you want pressed
-- code what you want to happen when r is pressed
end
end)
Report Abuse
tanlolol12345 is not online. tanlolol12345
Joined: 20 Jan 2012
Total Posts: 20664
13 Apr 2014 04:52 PM
if Script.Disabled == false then
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local open = false

Mouse.KeyDown:connect(function(k)
k = k:lower()
if k == "z" then --change r to whatever key you want pressed
Script.Parent.NormalBlade.Transparency = 1
Script.Parent.SuperBlade.Transparency = 0
Script.Parent.Script1.Disabled = true
Script.Parent.Script3.Disabled = false
Script.Parent.Script2.Disabled = false
Script.Disabled = true -- code what you want to happen when r is pressed
end
end)
end
Its supposed to toggle some scripts that changes damage, and script that allows for change back with same key
Can someone fix this?
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
13 Apr 2014 04:59 PM
"if Script.Disabled == false then"

this is pointless. how will a disabled script check if its disabled or not?

#nerdsunited
Report Abuse
tanlolol12345 is not online. tanlolol12345
Joined: 20 Jan 2012
Total Posts: 20664
13 Apr 2014 05:11 PM

local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local open = false

Mouse.KeyDown:connect(function(k)
k = k:lower()
if k == "z" then --change r to whatever key you want pressed
Script.Parent.NormalBlade.Transparency = 1
Script.Parent.SuperBlade.Transparency = 0 -- code what you want to happen when r is pressed
end
end)

Its still not working? Does this not work in solo?
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