Finding the Location to Put a Radio On a Players Back?

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?

1 Like

not totally sure but you could try to set the cframe a certain distance offset from the players torso position

hope this helps since im not a great scripter, just a thought.

1 Like

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’ll try this later, just remembered I have a math tutoring lesson right now, I’ll get back on whether I can get it to work or not.

1 Like

Try welding the Radio to the HumanoidRootPart.

There is already an attachment for accessories on the humanoid back, can’t you use that?

Maybe something on this page you can use:
https://developer.roblox.com/en-us/api-reference/function/Humanoid/AddAccessory

I’m not sure what radio you’re using but I assume it’s this one.

https://www.roblox.com/catalog/212641536/Golden-Super-Fly-Boombox

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)

https://gyazo.com/77e671180713872c1564f62c79095d99

3 Likes

Thanks, I’ll port this to the radio that I made.