so im making this armor with 3 pieces: Torso part, Left and right leg part.
when the script welds and puts the piece’s to the player, their rotated and facing the wrong way.
also i tried using CFrame with no succes, can someone help?
heres the script
local tool = script.Parent
local remote = script.Parent.RemoteEvent
local armor = tool:WaitForChild("Armor")
remote.OnServerEvent:Connect(function(plr, torso, humanoid, lLeg, rLeg)
local weld = Instance.new("Weld")
weld.Parent = torso
weld.Part0 = torso
weld.Part1 = armor
armor.Position = torso.Position
armor.Parent = plr.Character
-----
local weld = Instance.new("Weld")
weld.Parent = tool.LLeg
weld.Part0 = torso
weld.Part1 = tool.LLeg
tool.LLeg.Position = lLeg.Position
tool.LLeg.Parent = plr.Character
-----
local weld = Instance.new("Weld")
weld.Parent = tool.RLeg
weld.Part0 = torso
weld.Part1 = tool.RLeg
tool.RLeg.Position = rLeg.Position
tool.RLeg.Parent = plr.Character
tool.Handle.WeldConstraint:Remove()
humanoid.MaxHealth = humanoid.MaxHealth + 100
humanoid.Health = humanoid.Health + 100
tool:Remove()
end)
heres the local script
local tool = script.Parent
local armor = tool:WaitForChild("Armor")
local remote = tool.RemoteEvent
local player = game.Players.LocalPlayer
local torso = player.Character.Torso
local lLeg = player.Character["Left Leg"]
local rLeg = player.Character["Right Leg"]
local humanoid = player.Character.Humanoid
tool.Activated:Connect(function()
remote:FireServer(torso, humanoid, lLeg, rLeg)
end)