Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What's the prefix for Right arm or left arm?

String value? Because I can't seem to add a space when searching Right leg Right arm, etc.

1 answer

✓ Accepted answer

So, from the comments I assume that this is fired when something is hit.

if hit.Parent:FindFirstChild("Humanoid") then
	local arms = { hit.Parent["Left Arm"], hit.Parent["Right Arm"] } -- Put the arms in a table
	for i,v in pairs(arms) do -- Loop through the arms
		if hit.Name == v.Name then -- Check which arm is hit
			script.Parent.CFrame = CFrame.new(arms[i].Position) * CFrame.new() -- Set the CFrame position to the current arm
		end
	end
end	

Edit: OffTopic: What's up with all these random down voters?

3 comments

1

How would I put ["Right Arm"] in this Welding script? rarm = hit.Parent.???? script.Parent.CFrame = rarm.CFrame * CFrame.new(0,0,0)

1

Create some locals defining the arms. Local rarm = hit.Parent["Right Arm"]

1

THANKS!

This discussion is preserved as it was. New answers, comments, and votes are closed.