Skip to content
Om Puter

Om Puter

Berbagi Tutorial Coding dan Pemrograman Komputer

Menu
  • Channel YouTube ThirteeNov
  • Channel YouTube Om Puter
Menu

Script WeldConstraint untuk Parent Object di Roblox Studio agar semua child nya ngikutin gerakan parent

Posted on 13 September 202513 September 2025 by OmPuter

Misal kita punya part yang kita gerakkan pakai script, kalau ada child object, masalahnya child nya gak mau ngikutin parentnya. Nah, itu kenapa perlu script ini untuk ditambahkan ke parent object supaya childnya pada ngikut:

local part = script.Parent -- Parent object

-- Fungsi untuk mengelas semua child ke parent
local function weldChildren()
    for _, child in ipairs(part:GetChildren()) do
        if child:IsA("BasePart") then
            local weld = Instance.new("WeldConstraint")
            weld.Part0 = part
            weld.Part1 = child
            weld.Parent = child
        end
    end
end

-- Panggil fungsi saat script dijalankan
weldChildren()
Post Views: 240

Kategori

  • 3D Max
  • Adobe Animate
  • Android
  • c#
  • Cordova
  • HTML5, CSS & JavaScript
  • iOS
  • Lain-lain
  • Photoshop
  • PHP
  • Python
  • Roblox
  • Tak Berkategori
  • Unity
  • WordPress
ciihuy2020
© 2026 Om Puter | Powered by Superbs Personal Blog theme