Print not printing when it should I just don't even know anymore

Ok yeah so I got a function bound to humanoid.StateChanged:Connect() (ew humanoids) and for some ungodly reason.
image

image

Update:
image
image

Update:
It only seams to print if EDU is in the variable?
image

I wouldn’t be using humanoids if I had a choice but roblox does not give choices much of the time

This may be related to rojo as I am using it.

This user seams to be having a similar bug

TURNING STUDIO OFF AND BACK ON FIXED IT FOR SOME REASON.
Note: My wifi did die before this bug was noticed might be a factor

Could you please explain what you’re trying to script

Please don’t post your code as an image[1].

I had to rewrite your code because it was posted as an image to see if I could replicate the issue you’re having. I could not replicate that issue.

Script in StarterCharacterScripts:

local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")

local function onStateChanged(oldState, newState)
	local EDU = true
	-- Simulate for loop
	for _, v in ipairs(Character:GetChildren()) do
		if v:IsA("BasePart") then
			EDU = false
			break
		end
	end
	print(EDU)
	if true then
		print("true is truthy")
	end
end

Humanoid.StateChanged:Connect(onStateChanged)

Output:

image

Needs more context and/or debugging on your part.


1: For those who are security conscious: this website is open source. It just does not possess a certificate so it’s marked as not secure. CNAME for the website in the GitHub repository which allows the repository to be hosted on that site.

2 Likes