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 » Scripters
Home Search
 

Re: [ Works in Studio but not in real Server ]

Previous Thread :: Next Thread 
JellyJ3eans is not online. JellyJ3eans
Joined: 10 May 2011
Total Posts: 486
19 Aug 2016 09:25 AM
Idk. I'll add notes next to each of them describing what they do

Script isn't Local





local tool = script.Parent

function onKeyDown(key)
if (key ~= nil) then
key = key:lower()
if (key == "q") then
tool.Handle.keybladedraw:Play() -- Plays the Keybladedraw sound
tool.Handle.pe1.Enabled = true --Plays ParticleEmitter1
tool.Handle.pe2.Enabled = true -- Plays ParticleEmitter2
tool.Handle.pe3.Enabled = true -- Plays ParticleEmitter3
tool.Handle.pe4.Enabled = true -- Plays ParticleEmitter4
tool.Handle.Transparency = 0 -- Self explanatory
wait(0.5)
tool.Handle.keybladedraw:Pause() -- Pauses the Keybladedraw sound
tool.Handle.pe1.Enabled = false -- Turns off ParticleEmitter1
tool.Handle.pe2.Enabled = false -- Turns off ParticleEmitter2
tool.Handle.pe3.Enabled = false -- Turns off ParticleEmitter3
tool.Handle.pe4.Enabled = false -- Turns off ParticleEmitter4
tool.Handle.Transparency = 1 -- Self explanatory
tool.Handle.decal1.Transparency = 0 -- Puts decal1 on the now transparent handle
tool.Handle.decal1.Transparency = 0 -- Puts decal2 on the now transparent handle
tool.Handle.Drawn.Value = true -- Makes a BoolValue true stating the blade is drawn
print("Keyblade Drawn")

-- Pretty much the other half of this script is the exact same it's just reverse --


elseif (key == "e") then
tool.Handle.keybladedraw:Play()
tool.Handle.decal1.Transparency = 1
tool.Handle.decal2.Transparency = 1
tool.Handle.pe1.Enabled = true
tool.Handle.pe2.Enabled = true
tool.Handle.pe3.Enabled = true
tool.Handle.pe4.Enabled = true
tool.Handle.Transparency = 0
wait(0.5)
tool.Handle.keybladedraw:Pause()
tool.Handle.pe1.Enabled = false
tool.Handle.pe2.Enabled = false
tool.Handle.pe3.Enabled = false
tool.Handle.pe4.Enabled = false
tool.Handle.Transparency = 1
tool.Handle.Drawn.Value = false


end
end
end

tool.Equipped:connect(function(mouse)
mouse.KeyDown:connect(onKeyDown)
end)
Report Abuse
JellyJ3eans is not online. JellyJ3eans
Joined: 10 May 2011
Total Posts: 486
19 Aug 2016 09:35 AM
b1
Report Abuse
superpants2020 is not online. superpants2020
Joined: 10 Feb 2013
Total Posts: 804
19 Aug 2016 09:55 AM
Like I said in your other thread use uis keydown is deprecated
Report Abuse
MajorBoi is not online. MajorBoi
Joined: 21 Jun 2012
Total Posts: 284
19 Aug 2016 10:01 AM
^


Report Abuse
WrightPhillips99 is not online. WrightPhillips99
Joined: 27 Jun 2015
Total Posts: 667
19 Aug 2016 10:03 AM
exactly u haven't identified user input service u noob
Report Abuse
JellyJ3eans is not online. JellyJ3eans
Joined: 10 May 2011
Total Posts: 486
19 Aug 2016 10:07 AM
Since I actually am a noob I'm not salty xD

I thought KeyDown was much easier to understand but I guess I'll use the other method
Report Abuse
WrightPhillips99 is not online. WrightPhillips99
Joined: 27 Jun 2015
Total Posts: 667
19 Aug 2016 10:08 AM
It's fine just wanted to give you a reminder.
Report Abuse
llaserx is not online. llaserx
Joined: 10 Dec 2011
Total Posts: 53069
19 Aug 2016 10:08 AM
Serverscripts cant get players mouse
Report Abuse
JellyJ3eans is not online. JellyJ3eans
Joined: 10 May 2011
Total Posts: 486
19 Aug 2016 10:11 AM
http://wiki.roblox.com/?title=API:Class/UserInputService

Which of the functions or events should I be looking at for what I'm trying to do..?
Report Abuse
superpants2020 is not online. superpants2020
Joined: 10 Feb 2013
Total Posts: 804
19 Aug 2016 10:25 AM
Input began

Input ended and there's another wiki page on it go find it

I can't am on mobile 2 hard
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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