Creator Guide
English
English
  • 🚩Introduction to OVERDARE
  • 🐤Get Started
    • OVERDARE App
    • OVERDARE Studio
  • 📌Policy
    • Community Guidelines
    • UGC Creation Guidelines
    • Guidelines on the External Use of UGC
    • Logo Usage Guidelines
    • Intellectual Property Rights Policy
    • Reporting Guidelines
    • Guidelines on Disputing Suspensions and Bans
    • Creator Payout Policy
    • Monetization Guidelines
  • 🏰Studio Manual
    • Studio Interface
    • Asset Import
    • Coordinate System
    • Game Settings
    • Studio Test Play
    • World Publish
    • Collaboration
    • Script Editor
    • Align Tool
    • Animation Editor
    • Material Manager
    • Collision Groups
    • Tag Editor
    • Payout Guideline
    • Object
      • Part
      • Model
      • Character
        • Humanoid Description
      • Camera
      • Physics
      • Lighting
      • Tool
      • VFX
      • Sound
      • GUI
  • 📝Script Manual
    • Script Overview
    • Basic Guide to Lua
    • Coding Style
    • Object Reference
    • Event
    • Server-Client Communication
    • BindableEvent
    • Value Objects
    • Mobile Input Handling
    • Tween
    • Breakpoint
    • Module Script
    • TPS Strafing System
    • Saving & Loading Data
    • Unity Developer Guide
  • 📚API Reference
    • Enums
      • ActuatorRelativeTo
      • AnimationPriority
      • AspectType
      • AssetTypeVerification
      • BorderMode
      • CameraMode
      • CameraType
      • ContextActionResult
      • CoreGuiType
      • DominantAxis
      • EasingDirection
      • EasingStyle
      • ForceLimitMode
      • HttpCompression
      • HttpContentType
      • HumanoidDisplayDistanceType
      • HumanoidStateType
      • KeyCode
      • Material
      • MaterialPattern
      • NormalId
      • ParticleEmitterShape
      • ParticleEmitterShapeInOut
      • ParticleEmitterShapeStyle
      • ParticleFlipbookLayout
      • ParticleFlipbookMode
      • ParticleOrientation
      • PartType
      • PlaybackState
      • RaycastFilterType
      • RollOffMode
      • RotationType
      • UserInputState
      • UserInputType
      • VelocityConstraintMode
    • DataTypes
      • BlendSpaceSampleSata
      • BrickColor
      • CFrame
      • Color3
      • ColorSequence
      • ColorSequenceKeypoint
      • Content
      • Enum
      • EnumItem
      • NumberRange
      • NumberSequence
      • NumberSequenceKeypoint
      • OverlapParams
      • PhysicalProperties
      • Ray
      • RaycastParams
      • RaycastResult
      • ScriptConnection
      • ScriptSignal
      • TweenInfo
      • Udim
      • Udim2
      • Vector2
      • Vector3
    • Classes
      • Animation
      • AngularVelocity
      • AnimationTrack
      • Animator
      • Atmosphere
      • Attachment
      • Backpack
      • BackpackItem
      • BasePart
      • BaseScript
      • Beam
      • BindableEvent
      • BlendSpace
      • BoolValue
      • Bone
      • Camera
      • CharacterMesh
      • CollectionService
      • Constraint
      • ContextActionService
      • CoreGui
      • DataStore
      • DataModel
      • DataStoreGetOptions
      • DataStoreIncrementOptions
      • DataStoreInfo
      • DataStoreKeyPages
      • DataStoreKeyInfo
      • DataStoreService
      • DataStoreListingPages
      • DataStoreSetOptions
      • FormFactorPart
      • Frame
      • Folder
      • GlobalDataStore
      • GuiBase2d
      • GuiButton
      • GuiObject
      • HttpService
      • Humanoid
      • HumanoidDescription
      • ImageButton
      • ImageLabel
      • InputObject
      • IntValue
      • LayerCollector
      • Instance
      • Light
      • Lighting
      • LinearVelocity
      • LocalScript
      • LuaSourceContainer
      • MaterialService
      • MaterialVariant
      • MeshPart
      • Model
      • ModuleScript
      • Mouse
      • OrderedDataStore
      • Pages
      • Part
      • ParticleEmitter
      • PhysicsService
      • Player
      • PlayerGui
      • Players
      • PlayerScripts
      • PointLight
      • PVInstance
      • ReplicatedStorage
      • RemoteEvent
      • ScreenGui
      • RunService
      • Script
      • ServerStorage
      • ServiceProvider
      • Skeleton
      • ServerScriptService
      • Sound
      • SoundService
      • SoundGroup
      • SpotLight
      • SpawnLocation
      • StarterCharacterScripts
      • StarterPack
      • StarterGui
      • StarterPlayer
      • StarterPlayerScripts
      • StringValue
      • SurfaceGui
      • SurfaceGuiBase
      • Team
      • Teams
      • TextLabel
      • TextButton
      • Tool
      • Trail
      • Tween
      • TweenService
      • TweenBase
      • UIAspectRatioConstraint
      • UserGameSettings
      • UserInputService
      • UserSettings
      • VectorForce
      • Workspace
      • WrapLayer
      • WorldRoot
      • WrapTarget
  • 🅰️OVERDARE Glossary
  • 📰Release Note
Powered by GitBook
On this page
  • Overview
  • How Tools Work
  • Tool Properties
  • How to Use Tools
  • 1. Creating a Tool Instance
  • 2. Testing Tool Equipment
  • Equipping and Unequipping Tools via Script
  • When Scripting is Required
  • Methods for Equipping Tools
  • Unequipping Tools
  • Using Events for Tool Interactions
  1. Studio Manual
  2. Object

Tool

Overview

A Tool is an Instance designed to be equipped and used directly by a character. It allows characters to wield weapons or equipment, use items like potions, and interact with the game world. Tool interacts with the character through the process of equipping and unequipping, playing a crucial role in various gameplay scenarios.

How Tools Work

  • A Tool interacts directly with the character model to implement equipping and unequipping.

  • Tools are equipped in the character’s right hand, requiring the creation of a Handle Part.

  • While it is possible to create a Tool without a Handle, it can only be equipped via scripting.

  • The Handle serves as the reference point for positioning MeshParts and other Parts within the Tool.

Tool Properties

Below are the key properties and their descriptions:

Property
Description

TextureId

Specifies the image of the Tool displayed in the Backpack GUI.

CanBeDropped

Determines whether the Tool is automatically dropped in front of the player when the Tool's parent is changed to Workspace.

Enabled

Determines whether the player can use the Tool. If set to false, methods and events related to Tool activation/deactivation are blocked, preventing the player from using the Tool.

Grip

Sets the grip position when the character equips the Tool (using CFrame).

GripForward

Represents the direction the grip is facing, corresponding to the values of R02, R12, and R22 of the Grip CFrame rotation matrix. Stored as a Cframe in the Tool.Grip property along with GripUp, GripRight, and GripPos.

GripPos

Determines the grip position relative to the Handle.

GripRight

Represents the lateral direction of the grip, corresponding to the R00, R10, and R20 values of the Grip CFrame rotation matrix. Stored as a Cframe in the Tool.Grip property along with GripUp, GripForward, and GripPos.

GripUp

Represents the upward direction of the grip, corresponding to the R01, R11, and R21 values of the Grip CFrame rotation matrix. Stored as a Cframe in the Tool.Grip property along with GripRight, GripForward, and GripPos.

ManualActivationOnly

Determines whether the Tool.Activated event is only triggered when Tool:Activate() is explicitly called in a script.

How to Use Tools

1. Creating a Tool Instance

  1. Create a Tool instance in the Level Browser (Workspace).

  2. Create a Part under Tool and rename it to Handle.

  3. Place the MeshPart or Part as the tool to be held under the Handle and adjust its CFrame relative to the handle to set the correct equipping position.

2. Testing Tool Equipment

  1. Run the game and control the character.

  2. Make the character touch the Tool placed in the Workspace.

  3. When the Handle is touched, the character will equip the corresponding Tool in their right hand.

    • If the Tool is not equipped correctly, adjust the position and orientation of the MeshPart or Part under the Handle.

Equipping and Unequipping Tools via Script

When Scripting is Required

In some cases, you may want the Tool to be equipped only when a specific trigger or condition is met. In such cases, you can programmatically equip or unequip the Tool using scripts.

Methods for Equipping Tools

You can equip a Tool to a character in two ways shown below using scripts:

  1. Calling the Humanoid:EquipTool Method

    • The following method allows the character to equip the Tool directly.

    • Example Code:

local function Equip(player)
     local character = player.Character or player.CharacterAdded:Wait()
     local humanoid = character:FindFirstChild("Humanoid")
     local myTool = game.Workspace:FindFirstChild("MyTool")

     if humanoid and myTool then
         humanoid:EquipTool(myTool)
     end
end
  1. Changing the Tool.Parent

  • You can make characters equip a Tool by directly changing its parent object.

  • Example Code:

local function Equip(player)
     local myTool = game.Workspace:FindFirstChild("MyTool")
     local character = player.Character

     if character and myTool then
         myTool.Parent = Character
     end
end

Unequipping Tools

There are two main ways to unequip a Tool:

  1. Default Unequip: The Tool is unequipped and placed back in the player’s Backpack.

  2. Destroy: You can delete the Tool instance if it is no longer needed.

    • Example Code:

     local myTool = game.Workspace:FindFirstChild("MyTool")
     if myTool then
         myTool:Destroy()
     end
  1. Drop: If CanBeDropped is true, you can drop the Tool in front of the player by setting its parent to Workspace.

    • Example Code:

     local myTool = game.Workspace:FindFirstChild("MyTool")
     if myTool then
         myTool.Parent = game.Workspace
     end

Using Events for Tool Interactions

A Tool has various events that are triggered when equipped. These can be used to implement additional visual effects (VFX) or actions when the character equips a specific Tool.

  1. Create a ParticleEmitter: Add a ParticleEmitter to the Handle or any designated part where the effect should appear.

  2. Edit ParticleEmitter Properties : Adjust size, direction, count, and other particle settings.

  3. Disable ParticleEmitter : Set ParticleEmitter Enabled to false so the effect doesn’t appear before equipping.

  4. Write a Script: Write a script to activate the ParticleEmitter only when the weapon is equipped.

local Tool = script.Parent
local Emitter = Tool.Handle.LightSaber.ParticleEmitter
Tool.Equipped:Connect(function()   
     if Emitter then
         Emitter.Enabled = true
     end
 end)
 
 Tool.Unequipped:Connect(function()   
     if Emitter then
         Emitter.Enabled = false
     end
 end)
PreviousLightingNextVFX

Last updated 2 months ago

🏰