Learn
Motor Sınıfı
Tool

*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
Devralınan Üyeler
Devralan
Kod Örnekleri
Patlayıcı Araç Örneği
local tool = script.Parent
local function explode(point)
local e = Instance.new("Explosion")
e.DestroyJointRadiusPercent = 0 -- Patlamayı ölümcül yapma
e.Position = point
e.Parent = workspace
end
local function onActivated()
-- Aracı aktive eden Humanoid'i al
local human = tool.Parent.Humanoid
-- Humanoid'in hedeflediği mevcut noktada explode'u çağır
explode(human.TargetPoint)
end
tool.Activated:Connect(onActivated)
Kılıç Aracı Örneği
local tool = script.Parent
local function onTouch(partOther)
-- Önce, dokunduğumuz parçanın bir Humanoid'in parçası olup olmadığını kontrol edelim
local humanOther = partOther.Parent:FindFirstChild("Humanoid")
-- İnsan olmayanların dokunuşlarını dikkate alma
if not humanOther then
return
end
-- Kılıcı taşıyan Humanoid'in dokunuşlarını dikkate alma
if humanOther.Parent == tool.Parent then
return
end
humanOther:TakeDamage(5)
end
-- Bir kesme animasyonunu tetikle
local function slash()
-- Varsayılan karakter betikleri "toolanim" StringValue'yi dinleyecek
local value = Instance.new("StringValue")
value.Name = "toolanim"
value.Value = "Kes" -- ayrıca şunu deneyin: Sıçrama
value.Parent = tool
end
tool.Activated:Connect(slash)
tool.Handle.Touched:Connect(onTouch)

API Referansı
Özellikler
CanBeDropped
Paralel oku
Capabilities: Input
Tool.CanBeDropped:boolean

Enabled
Paralel oku
Capabilities: Input
Simulation Access
Tool.Enabled:boolean
Kod Örnekleri
Süper Atlama Aracı
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local tool = Instance.new("Tool")
tool.Name = "SüperAtlama"
tool.RequiresHandle = false
tool.Parent = player.Backpack
function toolActivated()
humanoid.JumpPower = 150
tool.Enabled = false
task.wait(5)
tool.Enabled = true
humanoid.JumpPower = 50
end
tool.Activated:Connect(toolActivated)
tool.Unequipped:Connect(function()
humanoid.JumpPower = 50
end)

Grip
Paralel oku
Capabilities: Input
Simulation Access
Tool.Grip:CFrame
Kod Örnekleri
Tutma Çubuğu
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local tool = Instance.new("Tool")
tool.Name = "Stick"
tool.Parent = player.Backpack
local handle = Instance.new("Part")
handle.Name = "Handle"
handle.Parent = tool
handle.Size = Vector3.new(0.1, 3, 0.1)
handle.Color = Color3.fromRGB(108, 88, 75) -- Kahverengi
tool.Activated:Connect(function()
print(tool.Grip)
print(tool.GripUp)
print(tool.GripRight)
print(tool.GripForward)
print(tool.GripPos)
end)

GripForward
Gizli
Çoğaltılmamış
Paralel oku
Capabilities: Input
Tool.GripForward:Vector3
Kod Örnekleri
Tutma Çubuğu
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local tool = Instance.new("Tool")
tool.Name = "Stick"
tool.Parent = player.Backpack
local handle = Instance.new("Part")
handle.Name = "Handle"
handle.Parent = tool
handle.Size = Vector3.new(0.1, 3, 0.1)
handle.Color = Color3.fromRGB(108, 88, 75) -- Kahverengi
tool.Activated:Connect(function()
print(tool.Grip)
print(tool.GripUp)
print(tool.GripRight)
print(tool.GripForward)
print(tool.GripPos)
end)

GripPos
Gizli
Çoğaltılmamış
Paralel oku
Capabilities: Input
Tool.GripPos:Vector3
Kod Örnekleri
Tutma Çubuğu
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local tool = Instance.new("Tool")
tool.Name = "Stick"
tool.Parent = player.Backpack
local handle = Instance.new("Part")
handle.Name = "Handle"
handle.Parent = tool
handle.Size = Vector3.new(0.1, 3, 0.1)
handle.Color = Color3.fromRGB(108, 88, 75) -- Kahverengi
tool.Activated:Connect(function()
print(tool.Grip)
print(tool.GripUp)
print(tool.GripRight)
print(tool.GripForward)
print(tool.GripPos)
end)

GripRight
Gizli
Çoğaltılmamış
Paralel oku
Capabilities: Input
Tool.GripRight:Vector3
Kod Örnekleri
Tutma Çubuğu
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local tool = Instance.new("Tool")
tool.Name = "Stick"
tool.Parent = player.Backpack
local handle = Instance.new("Part")
handle.Name = "Handle"
handle.Parent = tool
handle.Size = Vector3.new(0.1, 3, 0.1)
handle.Color = Color3.fromRGB(108, 88, 75) -- Kahverengi
tool.Activated:Connect(function()
print(tool.Grip)
print(tool.GripUp)
print(tool.GripRight)
print(tool.GripForward)
print(tool.GripPos)
end)

GripUp
Gizli
Çoğaltılmamış
Paralel oku
Capabilities: Input
Tool.GripUp:Vector3
Kod Örnekleri
Tutma Çubuğu
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local tool = Instance.new("Tool")
tool.Name = "Stick"
tool.Parent = player.Backpack
local handle = Instance.new("Part")
handle.Name = "Handle"
handle.Parent = tool
handle.Size = Vector3.new(0.1, 3, 0.1)
handle.Color = Color3.fromRGB(108, 88, 75) -- Kahverengi
tool.Activated:Connect(function()
print(tool.Grip)
print(tool.GripUp)
print(tool.GripRight)
print(tool.GripForward)
print(tool.GripPos)
end)

ManualActivationOnly
Paralel oku
Capabilities: Input
Tool.ManualActivationOnly:boolean
Kod Örnekleri
Sprint Aracı
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local tool = Instance.new("Tool")
tool.Name = "Sprint"
tool.RequiresHandle = false
tool.Parent = player:WaitForChild("Backpack")
function toolActivated()
humanoid.WalkSpeed = 30
tool.ManualActivationOnly = true
task.wait(5)
tool.ManualActivationOnly = false
humanoid.WalkSpeed = 16
end
tool.Activated:Connect(toolActivated)
tool.Unequipped:Connect(function()
humanoid.WalkSpeed = 16
end)

RequiresHandle
Paralel oku
Capabilities: Input
Tool.RequiresHandle:boolean

ToolTip
Paralel oku
Capabilities: Input
Tool.ToolTip:string

Yöntemler
Activate
Capabilities: Input
Tool:Activate():()
Dönüşler
()
Kod Örnekleri
Görünmezlik Aracı
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character
local tool = Instance.new("Tool")
tool.Name = "Görünmezlik Aracı"
tool.RequiresHandle = false
tool.Parent = player.Backpack
local invisible = false
local function toolActivated()
if invisible then
return
end
invisible = true
for _, bodypart in pairs(character:GetChildren()) do
if bodypart:IsA("MeshPart") or bodypart:IsA("Part") then
bodypart.Transparency = 1
end
end
task.wait(3)
tool:Deactivate()
task.wait(1)
invisible = false
end
local function toolDeactivated()
if not invisible then
return
end
for _, bodypart in pairs(character:GetChildren()) do
if bodypart.Name ~= "HumanoidRootPart" then
if bodypart:IsA("MeshPart") or bodypart:IsA("Part") then
bodypart.Transparency = 0
end
end
end
end
local function toolEquipped()
tool:Activate()
end
tool.Equipped:Connect(toolEquipped)
tool.Activated:Connect(toolActivated)
tool.Deactivated:Connect(toolDeactivated)
tool.Unequipped:Connect(toolDeactivated)

Deactivate
Capabilities: Input
Tool:Deactivate():()
Dönüşler
()
Kod Örnekleri
Görünmezlik Aracı
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character
local tool = Instance.new("Tool")
tool.Name = "Görünmezlik Aracı"
tool.RequiresHandle = false
tool.Parent = player.Backpack
local invisible = false
local function toolActivated()
if invisible then
return
end
invisible = true
for _, bodypart in pairs(character:GetChildren()) do
if bodypart:IsA("MeshPart") or bodypart:IsA("Part") then
bodypart.Transparency = 1
end
end
task.wait(3)
tool:Deactivate()
task.wait(1)
invisible = false
end
local function toolDeactivated()
if not invisible then
return
end
for _, bodypart in pairs(character:GetChildren()) do
if bodypart.Name ~= "HumanoidRootPart" then
if bodypart:IsA("MeshPart") or bodypart:IsA("Part") then
bodypart.Transparency = 0
end
end
end
end
local function toolEquipped()
tool:Activate()
end
tool.Equipped:Connect(toolEquipped)
tool.Activated:Connect(toolActivated)
tool.Deactivated:Connect(toolDeactivated)
tool.Unequipped:Connect(toolDeactivated)

Olaylar
Activated
Capabilities: Input
Tool.Activated():RBXScriptSignal

Deactivated
Capabilities: Input
Tool.Deactivated():RBXScriptSignal

Equipped
Capabilities: Input
Tool.Equipped(mouse:Mouse):RBXScriptSignal
Parametreler
mouse:Mouse
Kod Örnekleri
Bir Oyuncu Araç Ekip Edince Yazdır
local Tool = script.Parent
local function onEquipped(_mouse)
print("Araç ekip edildi")
end
Tool.Equipped:Connect(onEquipped)

Unequipped
Capabilities: Input
Tool.Unequipped():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.