Positing mesh with script

  1. I made a tool that wears a coil on right arm on activite

  2. its suppose to be stand upright but its stand horizontally
    image

  3. I tried to change all angles but don’t work

local coil = game.ReplicatedStorage:WaitForChild("Wear").RegenCoil
local tool = script.Parent
local db = false

tool.Activated:Connect(function()
	if not db then
		db = true
		local char = tool.Parent
		local hum = char:FindFirstChild("Humanoid")
		if hum then
			local root = char:FindFirstChild("Right Arm")
			if root then
				local newCoil = coil:Clone()
				newCoil.CFrame = root.CFrame * CFrame.Angles(0, math.rad(90), 0) -- Adjusted angles
				newCoil.Parent = char:FindFirstChild("Right Arm")
				newCoil.CFrame = root.CFrame
				local weld = Instance.new("Weld")
				weld.Part0 = newCoil
				weld.Part1 = root
				weld.Parent = newCoil
				tool:Destroy()
			end 
		end
	end
end)

Instead of weld, use WeldConstraint. Then, try different angles

Didn’t change anything still dont get rotate.

weld.C0 *= CFrame.Angles(0, math.rad(90), 0)

Add this to your code

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.