Script in starterCharacterScripts not running at all?

This code is placed inside of starterCharacterScripts and it is called “CharacterPhysicsHandler” I dont know why this isnt running at all? Not even print statements work inside the character added func

local Players = game:GetService("Players")

local localPlayer = Players.LocalPlayer


local function onCharacterAdded(character: Model)
	print("character added")
	
	character:FindFirstChild("HumanoidRootPart").CollisionGroup = "Character"
	
	for _, part in ipairs(character:GetChildren()) do
		if part:IsA("BasePart") then
			if part.Name == "Head" then
				return
			end

			part.CustomPhysicalProperties = PhysicalProperties.new(1, 0.13, 0, 100, 100)
			print(part.CustomPhysicalProperties)
		end
	end
end


localPlayer.CharacterAdded:Connect(onCharacterAdded)
1 Like

Your character is already loaded.
I suggest you check if your character is there like I learnt from FE2.

if localPlayer.Character then
   onCharacterAdded(localPlayer.Character)
end

right above your characteradded, and honestly this script would be better in starterplayerscripts considering your already checking for characteradded.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.