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: Scripting Help

Previous Thread :: Next Thread 
iiTylerSoul is not online. iiTylerSoul
Joined: 29 Jun 2015
Total Posts: 178
21 Jul 2016 06:52 PM
I am trying to make a game that has swords in it. I already have a sword model built and I need a script that welds a built sword model on to the player's hand. It would help me if you could write comments inside the script that explain how each of the functions work or just explain
to me how the script works.
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
21 Jul 2016 06:55 PM
Putting the welded parts of the sword in a Tool, unanchoring them, then equipping the tool will automatically weld the part named "Handle" to the player's hand, and by virtue of the welds, everything else will follow


Report Abuse
iiTylerSoul is not online. iiTylerSoul
Joined: 29 Jun 2015
Total Posts: 178
21 Jul 2016 07:08 PM
I am sorry I wasn't specific in my first post. I'd like to know how to weld the sword on to the player's hand without a tool. Also, the weld scripts I am using work but the angle isn't how I like it. If you know how to fix this, please explain to me. thx :D
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
21 Jul 2016 07:12 PM
Use the UserInputService to detect when a key 1 through 9 is pressed, and give them the corresponding tool by parenting the tool model to their Character, and then saying something like:

Sword = -- define your sword

w = Instance.new("ManualWeld")
w.Parent = Sword.Handle
w.Part0 = character["Right Arm"]
w.Part1 = Sword.Handle
w.C0 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0) -- here is where you set your CFrame and Angles


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