Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 07 Nov 2014 04:27 PM |
local mouse = game.Players.LocalPlayer:getMouse()
mouse.KeyDown:connect(function(key) if key == "e" and game.Players.LocalPlayer.PlayerGui.ScreenGui.ScrollingFrame.BackgroundTransparency == 0 then game.Players.LocalPlayer.PlayerGui.ScreenGui.ScrollingFrame.BackgroundTransparency = 1 end if key == "e" and game.Players.LocalPlayer.PlayerGui.ScreenGui.ScrollingFrame.BackgroundTransparency == 1 then game.Players.LocalPlayer.PlayerGui.ScreenGui.ScrollingFrame.BackgroundTransparency = 0 end end)
|
|
|
| Report Abuse |
|
|
|
| 07 Nov 2014 04:27 PM |
GetMouse!
GetMouse!
And your if statements make me cry :'( |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2014 04:28 PM |
| Protip: If a method name begins with a lowercase character, its wrong. |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 07 Nov 2014 04:31 PM |
local mouse = game.Players.LocalPlayer:getMouse()
mouse.KeyDown:connect(function(key) if key == "e" and game.Players.LocalPlayer.PlayerGui.ScreenGui.ScrollingFrame.BackgroundTransparency == 0 then game.Players.LocalPlayer.PlayerGui.ScreenGui.ScrollingFrame.BackgroundTransparency = 1
elseif key == "e" and game.Players.LocalPlayer.PlayerGui.ScreenGui.ScrollingFrame.BackgroundTransparency == 1 then game.Players.LocalPlayer.PlayerGui.ScreenGui.ScrollingFrame.BackgroundTransparency = 0 end end end)
I changed it up to this...I think it will fi my problem and I am sorry it is so sloppy lol....the ends are screwed up somehow? |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Nov 2014 04:32 PM |
Protip: If a method name begins with a lowercase character, its wrong. ^thats wrong |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2014 04:32 PM |
You put getMouse, it should be GetMouse.
Also, you should consider variables. |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2014 04:33 PM |
| @128GB: Examples, please. And nothing deprecated, that does not count (because they are deprecated) |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Nov 2014 04:34 PM |
local mouse = game.Players.LocalPlayer:getMouse()
there you go |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2014 04:37 PM |
@128GB: Never use deprecated methods.
Or ClearAllChildren, as I learned the hard way. |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Nov 2014 04:38 PM |
| Where does it say getMouse deprecated |
|
|
| Report Abuse |
|
|
LucasLua
|
  |
| Joined: 18 Jun 2008 |
| Total Posts: 7386 |
|
|
| 07 Nov 2014 04:51 PM |
| Roblox's naming scheme is all sorts of stupid. For example, properties in bodyPositions and bodyGyros are all lowercase (position and cframe) where their counterparts are capitalized in parts (Position and CFrame). Furthermore, certain older methods are camel case format, and the newer ones are all pascal case. This is a serious issue that is teaching bad practice, as the current industry standard is camel case. |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2014 04:55 PM |
@128GB: print(game.Players.LocalPlayer.getMouse) (WARNING) >22:55:00.551 - "Player.getMouse" should be "GetMouse" >function: 1D17C5F0 |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Nov 2014 05:03 PM |
| That doesn't make it depreciated |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2014 05:05 PM |
| Well, you should not be using it, it flags a warning. |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Nov 2014 05:06 PM |
Does that actually do anything? (Thats an actual question I'm not trying to be a smarta) |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 07 Nov 2014 05:07 PM |
| It doesn't make it deprecated. It makes it wrong. Roblox is just giving you a gotcha, and aliasing the camelCase variant to the PascalCase method so that your script doesn't break. |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2014 05:08 PM |
| No, but its terrible practice. You should NEVER use something labeled as deprecated, as it may be removed in future, or simply become broken. |
|
|
| Report Abuse |
|
|