Learn
Motor Sınıfı
Instance
Oluşturulamaz
Gezilemez

*Bu içerik, yapay zekâ (beta) kullanılarak çevrildi ve hatalar içerebilir. Sayfayı İngilizce görüntülemek için buraya tıkla.


Özet
Yöntemler
AddTag(tag: string):()
children():Instances
Artık Kullanılmayan
clone():Instance
Artık Kullanılmayan
Destroy():()
destroy():()
Artık Kullanılmayan
findFirstChild(name: string,recursive: boolean):Instance
Artık Kullanılmayan
GetAttribute(attribute: string):Variant
GetChildren():Instances
getChildren():Instances
Artık Kullanılmayan
GetDebugId(scopeLength: number):string
GetDescendants():Instances
GetStyled(name: string,selector: string?):Variant
isDescendantOf(ancestor: Instance):boolean
Artık Kullanılmayan
QueryDescendants(selector: string):Instances
Remove():()
Artık Kullanılmayan
remove():()
Artık Kullanılmayan
RemoveTag(tag: string):()
SetAttribute(attribute: string,value: Variant):()
WaitForChild(childName: string,timeOut: number):Instance
Devralınan Üyeler

API Referansı
Özellikler
Archivable
Paralel oku
Instance.Archivable:boolean

archivable
Artık Kullanılmayan

Capabilities
Paralel oku
Capabilities: CapabilityControl
Instance.Capabilities:SecurityCapabilities

Name
Paralel oku
Instance.Name:string

Parent
Çoğaltılmamış
Paralel oku
Instance.Parent:Instance

PredictionMode
Salt Okunur
Çoğaltılmamış
Betiklenemez
Paralel oku
Instance.PredictionMode:Enum.PredictionMode

RobloxLocked
Artık Kullanılmayan

Sandboxed
Çoğaltılmamış
Paralel oku
Capabilities: CapabilityControl
Instance.Sandboxed:boolean

UniqueId
Çoğaltılmamış
Roblox Betik Güvenliği
Roblox Güvenliği
Paralel oku
Instance.UniqueId:UniqueId

Yöntemler
AddTag
Instance:AddTag(tag:string):()
Parametreler
tag:string
Dönüşler
()

children
Artık Kullanılmayan

ClearAllChildren
Instance:ClearAllChildren():()
Dönüşler
()

Clone
Capabilities: CreateInstances
Simulation Access
Instance:Clone():Instance
Dönüşler
Kod Örnekleri
Bir Nesneyi Klonlama
local Workspace = game:GetService("Workspace")
-- Mevcut bir nesneye referans al
local model = script.Parent.Model
-- Modelin bir kopyasını oluştur
local clone = model:Clone()
-- Klonu orijinal modelin üstüne gelmeyecek şekilde hareket ettir
clone:PivotTo(model.PrimaryPart.CFrame - (Vector3.xAxis * 10))
-- Klonu Workspace'e ekle
clone.Parent = Workspace

clone
Artık Kullanılmayan

Destroy
Instance:Destroy():()
Dönüşler
()
Kod Örnekleri
Örnek:Destroy()
local part = script.Parent.Part
part:Destroy()

destroy
Artık Kullanılmayan

FindFirstAncestor
Paralel yaz
Instance:FindFirstAncestor(name:string):Instance?
Parametreler
name:string
Dönüşler

FindFirstAncestorOfClass
Paralel yaz
Instance:FindFirstAncestorOfClass(className:string):Instance?
Parametreler
className:string
Dönüşler

FindFirstAncestorWhichIsA
Paralel yaz
Instance:FindFirstAncestorWhichIsA(className:string):Instance?
Parametreler
className:string
Dönüşler

FindFirstChild
Paralel yaz
Simulation Access
Instance:FindFirstChild(
name:string, recursive:boolean
Parametreler
name:string
recursive:boolean
Varsayılan değer: false
Dönüşler
Kod Örnekleri
Öğe:FindFirstChild
local found = workspace:FindFirstChild("Brick")
if found then
found.Name = "Foo"
end

findFirstChild
Artık Kullanılmayan

FindFirstChildOfClass
Paralel yaz
Instance:FindFirstChildOfClass(className:string):Instance?
Parametreler
className:string
Dönüşler
Kod Örnekleri
Örnek: Sınıfın İlk Çocukunu Bul
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid
while not humanoid do
humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then
character.ChildAdded:Wait()
end
end

FindFirstChildWhichIsA
Paralel yaz
Simulation Access
Instance:FindFirstChildWhichIsA(
className:string, recursive:boolean
Parametreler
className:string
recursive:boolean
Varsayılan değer: false
Dönüşler

FindFirstDescendant
Paralel yaz
Instance:FindFirstDescendant(name:string):Instance?
Parametreler
name:string
Dönüşler

GetActor
Paralel yaz
Instance:GetActor():Actor?
Dönüşler

GetAttribute
Paralel yaz
Simulation Access
Instance:GetAttribute(attribute:string):Variant
Parametreler
attribute:string
Dönüşler
Variant

GetAttributeChangedSignal
Instance:GetAttributeChangedSignal(attribute:string):RBXScriptSignal
Parametreler
attribute:string
Dönüşler

GetAttributes
Paralel yaz
Simulation Access
Instance:GetAttributes():Dictionary
Dönüşler

GetChildren
Paralel yaz
Simulation Access
Instance:GetChildren():Instances
Dönüşler
Instances
Kod Örnekleri
Instance:GetChildren
local children = workspace:GetChildren()
for i = 1, #children do
print(i, children[i].Name)
end

getChildren
Artık Kullanılmayan

GetDebugId
Gezilemez
Eklenti Güvenliği
Instance:GetDebugId(scopeLength:number):string
Parametreler
scopeLength:number
Varsayılan değer: 4
Dönüşler
Kod Örnekleri
Instance:GetDebugId
print(workspace:GetDebugId()) --> 39FA_12
print(workspace:GetDebugId(10)) --> 39FA2FEF4D_12
print(workspace:GetDebugId(math.huge)) --> 12

GetDescendants
Paralel yaz
Simulation Access
Instance:GetDescendants():Instances
Dönüşler
Instances
Kod Örnekleri
Instance:GetDescendants
local descendants = workspace:GetDescendants()
-- Çalışma alanındaki tüm soyundan gelenleri döngüye al. Eğer bir
-- BasePart bulunursa, kod o parçanın rengini yeşile çevirir
for _, descendant in pairs(descendants) do
if descendant:IsA("BasePart") then
descendant.BrickColor = BrickColor.Green()
end
end

GetFullName
Paralel yaz
Simulation Access
Instance:GetFullName():string
Dönüşler
Kod Örnekleri
Instance:GetFullName
-- Basit bir hiyerarşi oluştur
local model = Instance.new("Model")
local part = Instance.new("Part")
part.Parent = model
local fire = Instance.new("Fire")
fire.Parent = part
print(fire:GetFullName()) --> Model.Part.Fire
model.Parent = workspace
print(fire:GetFullName()) --> Workspace.Model.Part.Fire
part.Name = "Merhaba, dünya"
print(fire:GetFullName()) --> Workspace.Model.Merhaba, dünya.Fire
Instance:GetFullName Lua Uygulaması
local function getFullName(object)
local result = object.Name
object = object.Parent
while object and object ~= game do
-- Ebeveyn adını ekle
result = object.Name .. "." .. result
-- Hiyerarşide yukarı git
object = object.Parent
end
return result
end
print(getFullName(workspace.Camera)) --> Workspace.Camera

GetStyled
Instance:GetStyled(
name:string, selector:string?
):Variant
Parametreler
name:string
selector:string?
Dönüşler
Variant

GetStyledPropertyChangedSignal
Instance:GetStyledPropertyChangedSignal(property:string):RBXScriptSignal
Parametreler
property:string
Dönüşler

GetTags
Paralel yaz
Simulation Access
Instance:GetTags():{any}
Dönüşler

HasTag
Paralel yaz
Simulation Access
Instance:HasTag(tag:string):boolean
Parametreler
tag:string
Dönüşler

IsAncestorOf
Paralel yaz
Simulation Access
Instance:IsAncestorOf(descendant:Instance):boolean
Parametreler
descendant:Instance
Dönüşler
Kod Örnekleri
Instance:IsAncestorOf()
local Workspace = game:GetService("Workspace")
local spawnLocation = Workspace.SpawnLocation
local decal = spawnLocation.Decal
-- Bu ifadeler doğrudur
print(Workspace:IsAncestorOf(spawnLocation))
print(Workspace:IsAncestorOf(decal))
print(spawnLocation:IsAncestorOf(decal))
-- Bu ifadeler yanlıştır
print(spawnLocation:IsAncestorOf(Workspace))
print(decal:IsAncestorOf(Workspace))
print(decal:IsAncestorOf(spawnLocation))

IsDescendantOf
Paralel yaz
Simulation Access
Instance:IsDescendantOf(ancestor:Instance):boolean
Parametreler
ancestor:Instance
Dönüşler
Kod Örnekleri
Instance:IsDescendantOf
local part = Instance.new("Part")
print(part:IsDescendantOf(game))
--> yanlış
part.Parent = workspace
print(part:IsDescendantOf(game))
--> doğru
part.Parent = game
print(part:IsDescendantOf(game))
--> doğru

isDescendantOf
Artık Kullanılmayan

IsPropertyModified
Simulation Access
Instance:IsPropertyModified(property:string):boolean
Parametreler
property:string
Dönüşler

QueryDescendants
Simulation Access
Instance:QueryDescendants(selector:string):Instances
Parametreler
selector:string
Dönüşler
Instances

Remove
Artık Kullanılmayan

remove
Artık Kullanılmayan

RemoveTag
Instance:RemoveTag(tag:string):()
Parametreler
tag:string
Dönüşler
()

ResetPropertyToDefault
Instance:ResetPropertyToDefault(property:string):()
Parametreler
property:string
Dönüşler
()

SetAttribute
Simulation Access
Instance:SetAttribute(
attribute:string, value:Variant
):()
Parametreler
attribute:string
value:Variant
Dönüşler
()

WaitForChild
Bekletebilir
Instance:WaitForChild(
childName:string, timeOut:number
Parametreler
childName:string
timeOut:number
Dönüşler
Kod Örnekleri
Öğe:ChildBekle
local part = workspace:WaitForChild("Part")
print(part.Name .. " Workspace'e eklendi")

Olaylar
AncestryChanged
Instance.AncestryChanged(
child:Instance, parent:Instance
Parametreler
child:Instance
parent:Instance
Kod Örnekleri
Instance.AileDeğişti
local Workspace = game:GetService("Workspace")
local redPart = script.Parent.RedPart
local bluePart = script.Parent.BluePart
local changingPart = script.Parent.ChangingPart
-- changingPart'in Rengini Üstüne bağlı olarak değiştirme
local function onAncestryChanged(part: Part, parent: Instance)
if parent == redPart then
changingPart.Color = Color3.new(1, 0, 0)
elseif parent == bluePart then
changingPart.Color = Color3.new(0, 0, 1)
else
changingPart.Color = Color3.new(1, 1, 1)
end
print(`{part.Name} artık {parent.Name} üstünde`)
end
changingPart.AncestryChanged:Connect(onAncestryChanged)
-- changingPart'in Üst özelliklerini zamanla farklı örneklere ayarlama
while true do
task.wait(2)
changingPart.Parent = redPart
task.wait(2)
changingPart.Parent = bluePart
task.wait(2)
changingPart.Parent = Workspace
end

AttributeChanged
Instance.AttributeChanged(attribute:string):RBXScriptSignal
Parametreler
attribute:string

ChildAdded
Instance.ChildAdded(child:Instance):RBXScriptSignal
Parametreler
child:Instance
Kod Örnekleri
Instance.ChildAdded
local function onChildAdded(instance)
print(instance.Name .. " workspace'e eklendi")
end
workspace.ChildAdded:Connect(onChildAdded)
local part = Instance.new("Part")
part.Parent = workspace --> Workspace'e eklendi

childAdded
Artık Kullanılmayan

ChildRemoved
Instance.ChildRemoved(child:Instance):RBXScriptSignal
Parametreler
child:Instance
Kod Örnekleri
Instance.ChildRemoved
local function onChildRemoved(instance)
print(instance.Name .. " workspace'ten kaldırıldı")
end
workspace.ChildRemoved:Connect(onChildRemoved)
local part = Instance.new("Part")
part.Parent = workspace
task.wait(2)
part:Destroy()

DescendantAdded
Instance.DescendantAdded(descendant:Instance):RBXScriptSignal
Parametreler
descendant:Instance
Kod Örnekleri
Instance.DescendantAdded
local function onDescendantAdded(descendant)
print(descendant)
end
workspace.DescendantAdded:Connect(onDescendantAdded)
local part = Instance.new("Part")
part.Parent = workspace

DescendantRemoving
Instance.DescendantRemoving(descendant:Instance):RBXScriptSignal
Parametreler
descendant:Instance
Kod Örnekleri
Instance.DescendantRemoving
workspace.DescendantRemoving:Connect(function(descendant)
print(descendant.Name .. " şu anda " .. tostring(descendant.Parent) .. "'a ebeveyn olarak atanmıştır.")
end)
local part = Instance.new("Part")
part.Parent = workspace
part.Parent = nil
--> Parça şu anda Workspace'e ebeveyn olarak atanmıştır
print(part.Parent)
--> nil

Destroying
Instance.Destroying():RBXScriptSignal
Kod Örnekleri
Yıkım Olayını Kullanma (Anlık sinyaller)
local part = Instance.new("Part", workspace)
local function onPartDestroying()
print("Beklemeden önce:", part:GetFullName(), #part:GetChildren())
task.wait()
print("Beklemeden sonra:", part:GetFullName(), #part:GetChildren())
end
part.Destroying:Connect(onPartDestroying)
part:Destroy()
Yıkım Olayını Kullanma (Ertelenmiş sinyaller)
local part = Instance.new("Part", workspace)
local function onPartDestroying()
print("Sinyal içinde:", part:GetFullName(), #part:GetChildren())
end
part.Destroying:Connect(onPartDestroying)
print("Yıkımdan önce:", part:GetFullName(), #part:GetChildren())
part:Destroy()
print("Yıkımdan sonra:", part:GetFullName(), #part:GetChildren())

StyledPropertiesChanged
Instance.StyledPropertiesChanged():RBXScriptSignal

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.