First part of the script (supposed to implement scripts into parts of the model)
function sandbox(var,func) local env = getfenv(func) local newenv = setmetatable({},{ __index = function(self,k) if k=="script" then return var else return env[k] end end, }) setfenv(func,newenv) return func end cors = {}
table.insert(cors,sandbox(Script243,function() function Touched(body) if body.Parent:findFirstChild("Humanoid") ~= nil then body.CanCollide = false body.Parent.Torso.Transparency = 0.001 body.Parent.Head.Transparency = 0.001 body.Parent["Left Arm"].Transparency = 0.001 body.Parent["Right Arm"].Transparency = 0.001 body.Parent["Left Leg"].Transparency = 0.001 body.Parent["Right Leg"].Transparency = 0.001 end end script.House.InsideStuff.MakeGlass.Touched:connect(Touched) function onTouched(hit) local d = hit.Parent:GetChildren() for i=1, #d do if (d[i].className == "Accessory") then for i, v in pairs(d[i]:GetChildren()) do if v:IsA("Part") and v.Name == "Handle" then v.Transparency = 0.001 end end end end end script.House.InsideStuff.MakeGlass.Touched:connect(onTouched) end))
Function that gives me errors.^
Thanks for the help.
Closed as Not Constructive by User#19524 and minikitkat
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?