|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|