The best way to make Shield on your arms

hi today im started to make my own Shield but i wanted to make it on my arms.
im not good at welding parts to part in scripts.

if someone help me then thanks, because i really dont know how to do it (In script and the character is r6)
shiled.rbxl (32.4 KB)

3 Likes

anyone help? because i really need it

local Players = game:GetService("Players")
local Character = script.Parent.Parent
local Player = Players:GetPlayerFromCharacter(script.Parent.Parent)

local Middle = script.Parent:WaitForChild("Middle")
local LeftArm = Character:WaitForChild("Left Arm")

for i,v in pairs(script.Parent.Parent:WaitForChild("VariantShield"):GetChildren()) do
	if v:IsA("Part") or v:IsA("BasePart") or v:IsA("UnionOperation") or v:IsA("MeshPart") then
		if v.Name ~= "Middle" then
			local Model = script.Parent.Parent:WaitForChild("VariantShield")
			
			local Weld = Instance.new("Weld", Model:WaitForChild("Middle"))
			Weld.C0 = Model:WaitForChild("Middle").CFrame:inverse() * v.CFrame:inverse()
			Weld.Part0 = Model:WaitForChild("Middle")
			Weld.Part1 = v
		end
	end
end

local Weld = Instance.new("Weld", LeftArm)
Weld.C0 = LeftArm.CFrame:inverse() * Middle.CFrame:inverse()
Weld.Part0 = LeftArm
Weld.Part1 = Middle

btw the script i made but idk how to use welds really. (ITS GLITCHY)

Wish i could help but i’m not really good in scripting. still heres a try

This one if the model is a group ( make a primary part )
If its not a group then just put local part = part location.

local player = game.Players.LocalPlayer
local character = player.CharacterAdded:wait() or workspace[player.Name]
spawn(function()
local part = grouplocation.Primarypart – CHANGE THIS OOF
local weld = Instance.new(“Weld”, part)
weld.Part0 = part
weld.Part1 = character[“Left Arm”]
weld.C0 = CFrame.new(0, 0, 0) *CFrame.new(0, 0, 0) – Position your Part
end)

Idk if this will work or not but at least i tried xP

1 Like

did the weld worked but the shield is in air or far away from player? if thats the case then u gotta play a little bit with weld.C0 = CFrame.new(0, 0, 0) *CFrame.new(0, 0, 0)

1 Like

no work but uhhh i did my script again it works perfectly but i cant rotate it. Anybody help please?

local Players = game:GetService("Players")
local Character = script.Parent.Parent
local Player = Players:GetPlayerFromCharacter(script.Parent.Parent)

local Middle = script.Parent:WaitForChild("Middle")
local LeftArm = Character:WaitForChild("Left Arm")

local Weld = Instance.new("Weld", LeftArm)
Weld.C0 = CFrame.new(0, 0, 0) * CFrame.new(0, 0, 0)
--Weld.C1 = CFrame.new(0, 0, 0) *CFrame.new(0, 0, 0)
Weld.Part0 = LeftArm
Weld.Part1 = Middle```
![image|404x480](upload://5XcEh6VxWpSQyPt97qodUuh95bH.jpeg)
1 Like

image
the png wasnt working so posted again sorry

1 Like

Try

part.Orientation = Vector3.new(x,y,z)

1 Like

Please edit your posts when you have new information to provide rather than adding a new post, it comes off as spammy (bumping).

I’d also like to remind you that Scripting Support isn’t a place to request for free code or to have others do what you can’t. Please see the category guidelines for more information. Throwing your file into a thread and asking for help without any specification of the problem doesn’t help anyone point you in the right direction.

4 Likes

try using CFrame.Angles (don’t forget to use math.rad())
API: CFrame | Documentation - Roblox Creator Hub

4 Likes