local clickDetector = script.Parent:WaitForChild("ClickDetector")
local function onClicked(player)
local character = player.Character
if not character then return end
local humanoid = character:FindFirstChild("Humanoid")
if not humanoid then return end
-- R6 only
if humanoid.RigType ~= Enum.HumanoidRigType.R6 then return end
local torso = character:FindFirstChild("Torso")
if not torso then return end
-- Prevent duplicate belt
if character:FindFirstChild("Chest") then return end
local beltTemplate = script.Parent.Parent:FindFirstChild("Chest")
if not beltTemplate then return end
-- Clone belt model
local belt = beltTemplate:Clone()
belt.Name = "Chest"
belt.Parent = character
-- Weld every physical object to torso
for _, obj in ipairs(belt:GetDescendants()) do
if obj:IsA("BasePart") then
obj.Anchored = false
obj.CanCollide = false
obj.Massless = true
-- Keep original offset
local weld = Instance.new("WeldConstraint")
weld.Part0 = torso
weld.Part1 = obj
weld.Parent = torso
end
end
-- Armor values (optional)
local saude = character:FindFirstChild("Saude")
if saude and saude:FindFirstChild("Protecao") then
saude.Protecao.VestProtect.Value = 200
saude.Protecao.VestVida.Value = 300
end
end
clickDetector.MouseClick:Connect(onClicked)
#This just doesnt work.
1 messages · Page 1 of 1 (latest)
** You are now Level 2! **
My belt is unions, meshparts, and parts.
Why ai gosh
Idk how to code 😭
Then learn 😭
Its to hard Ive tried, I just need help with this one script.
I can't really help with ai scripts they're hard to understand sry
Also I'm not a pro
@dreamy pecan you just told yourself the awnser
its an ai script
it wont work
ya gotta learn yourself
luau is easy to learn
just take time
I thimk you not making the variable for player humanoid properly
I've learned two months, I am now just like almost a pro
