|
| 06 Aug 2013 06:33 PM |
b = game.Workspace.Boat.Backup1 a = game.Workspace.Boat.Backup2 c = game.Workspace.Boat.Light1 d = game.Workspace.Boat.Light2 local mouse = game.Players.LocalPlayer:GetMouse()
function onKeyDown(key)
if key == "w" then c.Transparency = 0.5 c.BrickColor = BrickColor.new("Really red") d.Transparency = 0.5 d.BrickColor = BrickColor.new("Really red") elseif key == "s" then b.Transparency = 0 a.Transparency = 0 c.Transparency = 0 d.Transparency = 0 elseif key == "a" then c.Transparency = 0.5 d.Transparency = 0.5 elseif key == "d" then c.Transparency = 0.5 d.Transparency = 0.5 end end
mouse.KeyDown:connect(onKeyDown)
function OnKeyUp(key) if key == "w" then c.Transparency = 0 d.Transparency = 0 elseif key == "s" then a.Transparency = 0.5 b.Transparency = 0.5 elseif key == "a" then c.Transparency = 0 d.Transparency = 0 elseif key == "d" then c.Transparency = 0 d.Transparency = 0 end end
mouse.KeyUp:connect(OnKeyUp) |
|
|
| Report Abuse |
|
|
| |
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 06 Aug 2013 07:25 PM |
Is this a LocalScript? also, you need another connection line |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2013 07:25 PM |
| Make sure you're running it in a local script. Also, read this: http://wiki.roblox.com/index.php/User:Mark_Otaris/Essays/Receiving_help_from_scripters |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2013 07:29 PM |
| Yes i've tried a local script and still nothing. And if it helps its in a vehicle seat |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2013 07:30 PM |
| LocalScripts only work correctly under the client. Backpack, PlayerGui, or Character. |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2013 07:31 PM |
| I have it not as a local now. But what do I do to make it work in online mode? |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 06 Aug 2013 07:35 PM |
| put it in a player's Backpack |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2013 07:40 PM |
| If you mean't starterpack then it didn't work. Did you see the part where its in a vehicle seat? |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2013 07:42 PM |
| if it says 'localplayer' then it has to be somewhere in the player |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2013 07:43 PM |
| How do I put it in the player? |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 06 Aug 2013 07:47 PM |
| you change the parent to Backpack or PlayerGui or Character of a player |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2013 07:50 PM |
| The parent is locked in properties |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2013 08:05 PM |
| I finally got it with a local script in starterpack!! Thank you guys so much! |
|
|
| Report Abuse |
|
|