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: Only works in roblox studio?

Previous Thread :: Next Thread 
Toughlizard1345 is not online. Toughlizard1345
Joined: 13 Jul 2010
Total Posts: 1077
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
Toughlizard1345 is not online. Toughlizard1345
Joined: 13 Jul 2010
Total Posts: 1077
06 Aug 2013 07:23 PM
Bump
Report Abuse
iIikeyou is not online. 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
ColorfulBody is not online. ColorfulBody
Joined: 17 Jun 2012
Total Posts: 2353
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
Toughlizard1345 is not online. Toughlizard1345
Joined: 13 Jul 2010
Total Posts: 1077
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
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
06 Aug 2013 07:30 PM
LocalScripts only work correctly under the client. Backpack, PlayerGui, or Character.
Report Abuse
Toughlizard1345 is not online. Toughlizard1345
Joined: 13 Jul 2010
Total Posts: 1077
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 is not online. iIikeyou
Joined: 07 Mar 2012
Total Posts: 1659
06 Aug 2013 07:35 PM
put it in a player's Backpack
Report Abuse
Toughlizard1345 is not online. Toughlizard1345
Joined: 13 Jul 2010
Total Posts: 1077
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
marcopolo444 is not online. marcopolo444
Joined: 02 May 2010
Total Posts: 5114
06 Aug 2013 07:42 PM
if it says 'localplayer' then it has to be somewhere in the player
Report Abuse
Toughlizard1345 is not online. Toughlizard1345
Joined: 13 Jul 2010
Total Posts: 1077
06 Aug 2013 07:43 PM
How do I put it in the player?
Report Abuse
iIikeyou is not online. 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
Toughlizard1345 is not online. Toughlizard1345
Joined: 13 Jul 2010
Total Posts: 1077
06 Aug 2013 07:50 PM
The parent is locked in properties
Report Abuse
Toughlizard1345 is not online. Toughlizard1345
Joined: 13 Jul 2010
Total Posts: 1077
06 Aug 2013 08:05 PM
I finally got it with a local script in starterpack!! Thank you guys so much!
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