Ive got a radio model all set up, but I want it to go onto the players back when unequipped, I know how to do this, but I’m not sure how to position the thing on the players back.
How could I find the positioning on the players back to place it there?
Get a npc / dummy and set the radio to the humanoid root parts position, then move the radio to the back of the player only changing the x/z axis. Takeaway the origional position from the current position and that is your offset. Let’s say it’s 2 studs. You could then go ahead and say ```humanoidrootpart.CFrame + Vector3.new(2,0,0)
I just wrote this script which is compatible with both R6 and R15 avatar types (it’ll weld the radio to the player’s character’s back when unequipped.
local tool = script.Parent
local handle = tool.Handle
local player = tool:FindFirstAncestorOfClass("Player")
local character = player.Character
local humanoid = character.Humanoid
local connection
local function onToolEquipped()
local function onToolUnequipped()
local handleClone = handle:Clone()
if humanoid.RigType == Enum.HumanoidRigType.R6 then
local torso = character.Torso
handleClone.Parent = character
local weld = Instance.new("Weld")
weld.Part0 = torso
weld.Part1 = handleClone
weld.C0 *= CFrame.new(0, 0, 0.8) * CFrame.Angles(0, math.pi, 0)
weld.Parent = handleClone
handleClone.Parent = character
elseif humanoid.RigType == Enum.HumanoidRigType.R15 then
local upperTorso = character.UpperTorso
local weld = Instance.new("Weld")
weld.Part0 = upperTorso
weld.Part1 = handleClone
weld.C0 *= CFrame.new(0, 0, 0.9) * CFrame.Angles(0, math.pi, 0)
weld.Parent = handleClone
handleClone.Parent = character
end
connection:Disconnect()
end
local handleClone = character:FindFirstChild("Handle")
if handleClone then
handleClone:Destroy()
end
connection = tool.Unequipped:Connect(onToolUnequipped)
end
tool.Equipped:Connect(onToolEquipped)
Here’s the model file for reproduction purposes: radio.rbxm (8.5 KB)