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: WHY U NO WORK!

Previous Thread :: Next Thread 
Mariokillsyou645 is not online. Mariokillsyou645
Joined: 22 Aug 2011
Total Posts: 129
29 Aug 2014 06:35 PM
mouse = script.Parent.Parent
mouse.keyDown:connect(function(key)
if key == "+" then
hat = script.Parent.Parent.Character.Hat:clone()
hat.Parent = script.Parent.Parent.Character
end
end)

Why no work ^^^^^^
U normally drop hats when u press + so I tried to make it so that when u press + it duplicates the hat and places it on your head again :/
Report Abuse
Agarest is not online. Agarest
Joined: 15 Feb 2014
Total Posts: 25
29 Aug 2014 06:42 PM
clone()
Report Abuse
Mariokillsyou645 is not online. Mariokillsyou645
Joined: 22 Aug 2011
Total Posts: 129
29 Aug 2014 06:45 PM
?
Report Abuse
Xeleum is not online. Xeleum
Joined: 24 Oct 2010
Total Posts: 3507
29 Aug 2014 06:46 PM
Not +, you only press + when you hold shift as well. So it would be "=" instead. However, Im pretty sure the = button is rpresented in a different way
Report Abuse
FatalWing is not online. FatalWing
Joined: 25 Aug 2011
Total Posts: 1913
29 Aug 2014 06:46 PM
Agarest is a troll.
Report Abuse
Mariokillsyou645 is not online. Mariokillsyou645
Joined: 22 Aug 2011
Total Posts: 129
29 Aug 2014 06:47 PM
Even with = it doesn't work
Report Abuse
Xeleum is not online. Xeleum
Joined: 24 Oct 2010
Total Posts: 3507
29 Aug 2014 06:47 PM
Also,

mouse = script.Parent.Parent? What?
Report Abuse
Mariokillsyou645 is not online. Mariokillsyou645
Joined: 22 Aug 2011
Total Posts: 129
29 Aug 2014 06:48 PM
It's a normal script in the Starterpack :/
Report Abuse
Xeleum is not online. Xeleum
Joined: 24 Oct 2010
Total Posts: 3507
29 Aug 2014 06:49 PM
Im pretty sure you would use GetMouse()
Report Abuse
Mariokillsyou645 is not online. Mariokillsyou645
Joined: 22 Aug 2011
Total Posts: 129
29 Aug 2014 06:49 PM
mouse = script.Parent.Parent:GetMouse()*
Report Abuse
Xeleum is not online. Xeleum
Joined: 24 Oct 2010
Total Posts: 3507
29 Aug 2014 06:50 PM
game.Players.PlayerAdded:connect(function(player)
mouse = player:GetMouse()
mouse.keyDown:connect(function(key)
if key == "+" then
hat = script.Parent.Parent.Character.Hat:clone()
hat.Parent = script.Parent.Parent.Character
end
end)
end)

Try that.
Report Abuse
Agarest is not online. Agarest
Joined: 15 Feb 2014
Total Posts: 25
29 Aug 2014 06:51 PM
Lel I posted something random of the thread. I was suppose to add it to something somewhere.
Report Abuse
Mariokillsyou645 is not online. Mariokillsyou645
Joined: 22 Aug 2011
Total Posts: 129
29 Aug 2014 06:52 PM
Still no work?
Report Abuse
Xeleum is not online. Xeleum
Joined: 24 Oct 2010
Total Posts: 3507
29 Aug 2014 06:54 PM
Is the hat in the character called "Hat"? Normally, they're called BeautifulHair, ClockWorkHeadphones, etc.
Report Abuse
Mariokillsyou645 is not online. Mariokillsyou645
Joined: 22 Aug 2011
Total Posts: 129
29 Aug 2014 06:54 PM
Yup, I changed it
Report Abuse
Mariokillsyou645 is not online. Mariokillsyou645
Joined: 22 Aug 2011
Total Posts: 129
29 Aug 2014 06:59 PM
Still no work
Report Abuse
oatsssss is not online. oatsssss
Joined: 31 Jul 2014
Total Posts: 170
29 Aug 2014 07:07 PM
This script will run into an error if the character doesn't have a hat.
Report Abuse
Mariokillsyou645 is not online. Mariokillsyou645
Joined: 22 Aug 2011
Total Posts: 129
29 Aug 2014 08:27 PM
But he does have a hat
Report Abuse
oatsssss is not online. oatsssss
Joined: 31 Jul 2014
Total Posts: 170
29 Aug 2014 11:55 PM
Not all players will have hats tho, good programmers account for all possible cases.
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