Script doesn't print

Hi, I am making a script which detects if the player has resized their limbs and print it on the client, but it doesn’t print for some reason.

Script:

--local RunService = game:GetService("RunService")
local Players = game:GetService("Players")

local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()

local Limbs = {"Right Leg", "Left Leg", "Right Arm", "Left Arm", "Torso", "Head", "HumanoidRootPart"}
local Sizes = {Vector3.new(1, 2, 1), Vector3.new(1, 2, 1), Vector3.new(1, 2, 1), Vector3.new(1, 2, 1), Vector3.new(2, 2, 1), Vector3.new(2, 1, 1), Vector3.new(2, 2, 1)}


while task.wait(4) do
	for _, v in pairs(Character:GetChildren()) do
		if v:IsA("Part") then
			for Index, Secondary in pairs(Limbs) do
				if v.Name == Limbs[Index] and v.Size ~= Sizes[Index] then
					print("Limb reize!")
					break
				end
			end
		end
	end
end

Any help would be appriciated, thanks!

One initial problem I noticed from your code is instead of doing v:IsA("Part") you’d want to use v:IsA("BasePart") so all part types can be detected, because most character limbs are mesh parts.

Ok, I’ll try this thank you so much.

EDIT:

It still won’t work, I don’t know why

--local RunService = game:GetService("RunService")
local Players = game:GetService("Players")

local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()

local Limbs = {"Right Leg", "Left Leg", "Right Arm", "Left Arm", "Torso", "Head", "HumanoidRootPart"}
local Sizes = {Vector3.new(1, 2, 1), Vector3.new(1, 2, 1), Vector3.new(1, 2, 1), Vector3.new(1, 2, 1), Vector3.new(2, 2, 1), Vector3.new(2, 1, 1), Vector3.new(2, 2, 1)}


while true do
	task.wait(4)
	for _, v in pairs(Character:GetChildren()) do
		if v:IsA("BasePart") then
			for Index, Secondary in pairs(Limbs) do
				print(Limbs[Index],Sizes[Index])
				if v.Name == Limbs[Index] and v.Size == Sizes[Index] then
					print("Limb reize!")
					break
				end
			end
		end
	end
end

You accidentally put ~= instead of == , and now it works.

No, I am trying to see if the limbs are not the deafult sizes.

I don’t see any problems with your script. Have you placed your LocalScript under StarterCharacterScripts?

local RunService = game:GetService("RunService")
local Players = game:GetService("Players")

local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()

local Limbs = {"Right Leg", "Left Leg", "Right Arm", "Left Arm", "Torso", "Head", "HumanoidRootPart"}
local Sizes = {Vector3.new(1, 2, 1), Vector3.new(1, 2, 1), Vector3.new(1, 2, 1), Vector3.new(1, 2, 1), Vector3.new(2, 2, 1), Vector3.new(2, 1, 1), Vector3.new(2, 2, 1)}


while task.wait(4) do
	for _, v in pairs(Character:GetChildren()) do
		if v:IsA("BasePart") or v:IsA('UnionOperation') then
			for Index, Secondary in pairs(Limbs) do
				v:GetPropertyChangedSignal('Size'):Connect(function()
                          print('Resized')
                end)
			end
		end
	end
end

There are no parts in a character model, only MeshParts.

R6 models do not use MeshParts, save for maybe Accessories.

This still doesn’t print for some reason.

I will try that right now, thanks.