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
 

How do I create a weld onTouch?

Previous Thread :: Next Thread 
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
08 Dec 2013 06:36 PM
I'm pretty new to scripting.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Dec 2013 06:39 PM
http://www.roblox.com/Forum/ShowPost.aspx?PostID=119820659
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Dec 2013 06:40 PM
Disregard last comment.

OBJECTNAME.Touched:connect(function(part)
if part.Parent and part.Parent:findFirstChild("Humanoid") then
weld =Instance.new("Weld")
end
end)
Report Abuse
awesome404 is not online. awesome404
Joined: 11 Jan 2009
Total Posts: 3601
08 Dec 2013 06:41 PM
It depends on if you want to weld one brick to another or all the bricks to one
Report Abuse
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
08 Dec 2013 06:42 PM
@awesome, I want the player to weld to the brick.
Report Abuse
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
08 Dec 2013 06:44 PM
Didn't work. :(
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Dec 2013 06:54 PM
Well now that I know that...

OBJECTNAME.Touched:connect(function(part)
if part.Parent and part.Parent:findFirstChild("Humanoid") then
weld =Instance.new("Weld",part)
weld.Part0 = part
weld.Part1 = OBJECTNAME
end
end)
Report Abuse
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
08 Dec 2013 07:07 PM
Still didn't work. Not sure if this is helpful but when the player touches the brick, they are sliding into it. (From ice.)
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Dec 2013 07:12 PM
Did you change the OBJECTNAME into the actual object's path... e.e

like script.Parent?
Report Abuse
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
08 Dec 2013 07:21 PM
Path? I just changed it the what I named the Brick, "SnowBoulder"
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Dec 2013 07:29 PM
game.Workspace.SnowBuilder

replace OBJECTNAME with above.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Dec 2013 07:30 PM
*I meant
game.Workspace.SnowBoulder

Report Abuse
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
08 Dec 2013 07:32 PM
It worked! Now, how do I destroy the weld after a tenth of a second?
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Dec 2013 07:33 PM
wait(1/10)
weld:Destroy()
...
Report Abuse
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
08 Dec 2013 07:34 PM
where do I add that? And do I have to say end?
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Dec 2013 07:35 PM
No end

And right before the
"end)"
Report Abuse
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
08 Dec 2013 07:38 PM
Uhh it didn't work.
Report Abuse
awesome404 is not online. awesome404
Joined: 11 Jan 2009
Total Posts: 3601
08 Dec 2013 07:41 PM
wait(.1)
weld:Destroy()

at the end
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
08 Dec 2013 07:42 PM
I find it useless to help people like this. They need to go and at least get a grasp of the basics of the Lua language before beginning to code their own game.
Report Abuse
lolb3 is not online. lolb3
Joined: 16 Jan 2010
Total Posts: 2268
08 Dec 2013 07:43 PM
Wazap I feel honored
Report Abuse
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
08 Dec 2013 07:43 PM
"People like this"

Wow, how kind. They're trying to be helpful. And the game I'm creating doesn't even require scripting except for this one here that I'm having difficulty with. You probably don't even know how to do this code that they're helping me with.
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
08 Dec 2013 07:46 PM
You're right, I don't. I'm a poor old noob who doesn't know how to code. You guys finally figured me out. [/sarcasm]
Report Abuse
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
08 Dec 2013 07:46 PM
Still didn't work. Ugh. I don't know what to do. I don't understand Lua whatsoever.
Report Abuse
PiggyJingles is not online. PiggyJingles
Joined: 13 Jan 2009
Total Posts: 2472
08 Dec 2013 07:47 PM
Shhhh, no need for a flame war.
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
08 Dec 2013 07:52 PM
@Piggy

butbutbut, why not? I find them funny!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 2Go to page: [1], 2 Next
 
 
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