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

Trying to size down accessory's handle but Handle is an unknown global?

So what I'm trying to do is I want every accessory on a player to be resized to 0.1

game:GetService("Players"):Connect(function(player)
player.CharacterAdded:Connect(function(character)
	wait(1)
	for i,v in pairs(character:GetChildren()) do
		if v:IsA("Accessory") then
			v:FindFirstChild("Handle")
				if Handle then
				Handle.Size = Vector3.new(0.1, 0.1, 0.1)
			end
			end
		end
	end)
end)

I am not well experienced with this kind of scripting. I have followed everything in this tutorial Instance:FindFirstChild, but Handle is still an unknown global. Can someone tell me what's wrong?

1 answer

✓ Accepted answer

line 6 and 7, first you do v:FindFirstChild("Handle") but you are not doing anything with this, you aren't storing it, and you definitly aren't setting something about it i think you meant to set the variable "Handle" to v:FindFir... but you didn't.

It should also be noted that this will not actually size down the instead you should be resizing the mesh.

game:GetService("Players").PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
    wait(1)
    for i,v in pairs(character:GetChildren()) do
        if v:IsA("Accessory") then
            local Handle = v:FindFirstChild("Handle")
            	if Handle then
            	Handle.Size = Vector3.new(0.1, 0.1, 0.1)
            	end
            end
        end
    end)
end)

4 comments

0

I'm no longer getting errors in the script, but ingame it says Connect isn't a valid member of Players

0

Also I was actually going to size down the handle and not the mesh because of hitbox issues

0

i made a whoopsiedaisy, should work now

0

Thank you! It's working now

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