User talk:Anaminus/Script:Welder: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Kaze
No edit summary
 
>Anaminus
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 18: Line 18:


--[[User:Kaze|Kaze]] 23:05, 6 August 2008 (CDT)
--[[User:Kaze|Kaze]] 23:05, 6 August 2008 (CDT)
You can tell this is old, can't you? --[[User:Anaminus|Anaminus]] 01:47, 7 August 2008 (CDT)

Latest revision as of 06:47, 7 August 2008

This script is a little defective... You need to change

script.Parent.Parent:FindFirstChild(script.Parent.Name)

To

c = script.Parent.Parent:GetChildren()
for a = 1, #c do
if c[i].className ~= "Model" then return end
--Script
end

It's safer, and less 'breakable'. Since the FindFirstChild() function finds the FIRST CHILD, which in this case seems to be a part, it doesn't work. It tries to weld the script to the brick, which is impossible.


--Kaze 23:05, 6 August 2008 (CDT)


You can tell this is old, can't you? --Anaminus 01:47, 7 August 2008 (CDT)