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
 

Broken Weld script

Previous Thread :: Next Thread 
brickbuilder74 is not online. brickbuilder74
Joined: 23 Jun 2008
Total Posts: 8810
04 Feb 2012 06:36 PM
This is not doing what it's supposed to do because when I pull out my sniper, some parts fall off/remove.


local prev
local parts = script.Parent:GetChildren()
for i=1,#parts do
if (parts[i].ClassName == "Part") then
prev = parts[i]
if prev then
local weld = Instance.new("Weld")
weld.Part0 = prev
weld.Part1 = parts[i]
weld.C0 = prev.CFrame:inverse()
weld.C1 = parts[i].CFrame:inverse()
weld.Parent = prev
end
end
end
Report Abuse
brickbuilder74 is not online. brickbuilder74
Joined: 23 Jun 2008
Total Posts: 8810
04 Feb 2012 06:38 PM
Bump
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
04 Feb 2012 06:39 PM
Try for i,v?
Report Abuse
Penguine236 is not online. Penguine236
Joined: 13 Apr 2011
Total Posts: 1303
04 Feb 2012 06:39 PM
nice free model
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
04 Feb 2012 06:40 PM
LOL! Oh you're nice...
Report Abuse
brickbuilder74 is not online. brickbuilder74
Joined: 23 Jun 2008
Total Posts: 8810
04 Feb 2012 06:41 PM
Don't be so quick to say a simple weld script is a free model. You don't even have a game... or a life.
Report Abuse
Penguine236 is not online. Penguine236
Joined: 13 Apr 2011
Total Posts: 1303
04 Feb 2012 06:42 PM
"when I pull out my sniper,"

I highly doubt thats is YOUR sniper, because if you cant even make a weld script, how did you make a sniper?
Report Abuse
brickbuilder74 is not online. brickbuilder74
Joined: 23 Jun 2008
Total Posts: 8810
04 Feb 2012 06:44 PM
I came here for help because I DONT KNOW HOW TO MAKE A GOOD WLED SCRIPT OBVIOUSLY! That's why my sniper DOESN'T WORK!
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
04 Feb 2012 06:45 PM
To be impartial people specialize in different things, I specialize in like GUIs, chat commands, and most scripts because I've been doing RBX.Lua for almost three years. Also, brickbuilder MOST likely specializes in tycoons.
Report Abuse
Penguine236 is not online. Penguine236
Joined: 13 Apr 2011
Total Posts: 1303
04 Feb 2012 06:45 PM
So that means you're sniper is also a free model. If yuo cant make a simple weld script, then your sniper is definitly a free model. And about your last post, i do have a game. In that game is an admin script that yes, i did make myself.
Report Abuse
Freakyboy67 is not online. Freakyboy67
Joined: 21 Mar 2009
Total Posts: 2502
04 Feb 2012 06:46 PM
I have a script for you. PM me.
Report Abuse
brickbuilder74 is not online. brickbuilder74
Joined: 23 Jun 2008
Total Posts: 8810
04 Feb 2012 06:47 PM
Get a life. I'm quitting Roblox because of people like you.

I made the sniper myself, but PARTS FALL OFF BECAUSE OF THIS WELD SCRIPT!
Report Abuse
Penguine236 is not online. Penguine236
Joined: 13 Apr 2011
Total Posts: 1303
04 Feb 2012 06:49 PM
ironic how you say ppl "like me" who actually take time to learn scripting, and others(ppl like you) just want online money and fame so they take a bunch of free models. If you can make a sniper, you can make a weld script.
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
04 Feb 2012 06:49 PM
I love making admin scripts XD.

Okay, this MAY not be right, but try this:

for i,v in pairs(script.Parent:GetChildren()) do
if v.ClassName == "Part" and v then
weld = Instance.new("Weld",v)
weld.Part0 = script.Parent.Handle
weld.Part1 = v
weld.C0 = script.Parent.Handle.CFrame:inverse()
weld.C1 = v.CFrame:Inverse
end
end
Report Abuse
brickbuilder74 is not online. brickbuilder74
Joined: 23 Jun 2008
Total Posts: 8810
04 Feb 2012 06:52 PM
Well, obviously you can't fix it either, pen. You haven't said a single word of help to me that has the slightest indication that you have any knowledge of programming.
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
04 Feb 2012 06:53 PM
Part0.CFrame==Part0.Position*C0
C0=Part0.CFrame:inverse()*Part0.Position

Part1.CFrame==Part0.Position*C1
C1=Part1.CFrame:inverse()*Part0.Position


So your script should be

local prev
local parts = script.Parent:GetChildren()
for i=1,#parts do
if (parts[i].ClassName == "Part") then
prev = parts[i]
if prev then
local weld = Instance.new("Weld")
weld.Part0 = prev
weld.Part1 = parts[i]
weld.C0 = prev.CFrame:inverse()*CFrame.new(prev.Position);
weld.C1 = parts[i].CFrame:inverse()*CFrame.new(prev.Position);
weld.Parent = prev
end
end
end
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
04 Feb 2012 06:53 PM
This may not be the time to say this, but one of you guys be the bigger man stop this fight! Dang, it was a pointless fight.
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
04 Feb 2012 06:54 PM
THANK YOU, DUKE!
Report Abuse
Penguine236 is not online. Penguine236
Joined: 13 Apr 2011
Total Posts: 1303
04 Feb 2012 06:55 PM
Oh brick. Ive been on this forum for a while and ppl know that i know scripting and programing. Example:

xvgigakid
miz656
AgentFireFox


Go ask them
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
04 Feb 2012 06:56 PM
Pen, you forgot to add me, XD =3.
Report Abuse
brickbuilder74 is not online. brickbuilder74
Joined: 23 Jun 2008
Total Posts: 8810
04 Feb 2012 06:57 PM
Forget you, pen. Just leave me alone, and when you're ready to apologize, PM me. I won't read it, though, because of your horrible grammar.
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
04 Feb 2012 06:58 PM
@penguine

I've been on this forum a lot longer than you however, I've never heard of you before. I've heard of brick and I know he can script, either way get off his back. Doesn't matter if they are trying to fix a free model script or not, you help them. Don't attack them for such things because, everyone has to try to learn from somewhere and disecting free models is one of the easiest ways and best ways.
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
04 Feb 2012 06:58 PM
BB74, since when did you answer PMs? Also, I would apologize to pen, too because you both fought. As I said before, be the bigger man.
Report Abuse
Penguine236 is not online. Penguine236
Joined: 13 Apr 2011
Total Posts: 1303
04 Feb 2012 06:58 PM
Oh, ok then, add flappy too. :D

anyway, lets talk scripting.

About SDukes script


"prev = parts[i]
if prev then
local weld = Instance.new("Weld")
weld.Part0 = prev
weld.Part1 = parts[i]"

Why would you do that? That assigns Part0 and Part1 to the same exact thing.
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
04 Feb 2012 06:59 PM
JESUS, THANK YOU, DUKE! Everyone learned from editing scripts like from free models! I mean everyone on ROBLOX.
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