Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is this Possible?

Asked by 9 years ago
function getLocations(obj)
    for i, v in pairs(workspace["Group Teleporters"]:GetChildren())do
        if(v.Name == "InstantTeleport")then
            local val = Instance.new("ObjectValue", obj)
            val.Name = v.LocationName.Value
            val.Value = v
        end
    end
end

Ok so let me explain on what I'm asking what/if it's possible, with :GetChildren() and the v.Name == "InstantTeleport" If I add this # to the end of the name will it look for the num at the and of the model or does it have to be num at the end? So I'm asking is this possible with GetChildren and a # sign to find like InstantTeleport1, InstantTeleport2 etc...

Answer this question