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: Tool maker

Previous Thread :: Next Thread 
deathrider2099 is not online. deathrider2099
Joined: 25 Feb 2010
Total Posts: 1322
11 May 2013 03:09 PM
I made a cross bow. I mini'ed it. I put in the weld scripts. and when i unanchored *drum roll* It blows up. How do I make it stay together
Report Abuse
shotgreen999 is not online. shotgreen999
Joined: 29 Nov 2009
Total Posts: 376
11 May 2013 03:28 PM
Sounds like the weld script is not working right can you post the weld script here.
Report Abuse
deathrider2099 is not online. deathrider2099
Joined: 25 Feb 2010
Total Posts: 1322
11 May 2013 04:50 PM
t = script.Parent

wait(5)

function stick(x, y)
weld = Instance.new("Weld")
weld.Part0 = x
weld.Part1 = y
local HitPos = x.Position
local CJ = CFrame.new(HitPos)
local C0 = x.CFrame:inverse() *CJ
local C1 = y.CFrame:inverse() * CJ
weld.C0 = C0
weld.C1 = C1
weld.Parent = x
end

function Weldnow()
c = t:children()
for n = 1, #c do
if (c[n].className == "Part") then
if (c[n].Name ~= "MainPart") then
stick(c[n], t.MainPart)
wait()
c[n].Anchored = false
end

if (c[n].className == "Flag") then
if (c[n].Name ~= "MainPart") then
stick(c[n], t.MainPart)
wait()
c[n].Anchored = false
end

if (c[n].className == "Handle") then
if (c[n].Name ~= "MainPart") then
stick(c[n], t.MainPart)
wait()
c[n].Anchored = false
end

if (c[n].className == "Hat") then
if (c[n].Name ~= "MainPart") then
stick(c[n], t.MainPart)
wait()
c[n].Anchored = false
end
end
if (c[n].className == "Seat") then
if (c[n].Name ~= "MainPart") then
stick(c[n], t.MainPart)
wait()
c[n].Anchored = false
end
end
if (c[n].className == "SpawnLocation") then
if (c[n].Name ~= "MainPart") then
stick(c[n], t.MainPart)
wait()
c[n].Anchored = false
end
end
if (c[n].className == "TrussPart") then
if (c[n].Name ~= "MainPart") then
stick(c[n], t.MainPart)
wait()
c[n].Anchored = false
end
end
if (c[n].className == "VehicleSeat") then
if (c[n].Name ~= "MainPart") then
stick(c[n], t.MainPart)
wait()
c[n].Anchored = false
end
end
end
end

wait()

t.MainPart.Anchored = false

Weldnow()
Report Abuse
shotgreen999 is not online. shotgreen999
Joined: 29 Nov 2009
Total Posts: 376
11 May 2013 07:35 PM
Did you run it before you unanchored it?
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