Help with bighead script

  1. What do you want to achieve? Keep it simple and clear!
    I want to make the script below work.
  2. What is the issue? Include screenshots / videos if possible!
    The issue is I am not sure if the click detectors are broken or if my script is not working.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have tested with the click detector using basic scripts, and they seem to be broken.
    I used a simple print script and I got the error:
    image
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
	
		game.Workspace.head.ClickDetector.MouseClick:Connect(function()
			local testing = character:WaitForChild("Testing")
			if testing.Value == true  then
				if character.Humanoid.HeadScale.Value <= 2.5 then
				character.Humanoid.HeadScale.Value = character.Humanoid.HeadScale.Value + .5
			else 
				
		end
		end

		
	
	end)
	end)
	end)


Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

EDIT: I fixed the clicker, but the headscript is slightly wrong. It increases size not mattering what the value is.

1 Like

I may have fixed it hold on. I am testing currently.

What line does it tell you the output error is in?

I fixed the error, i didn’t put :Connect(function()
(I missed the function)
But the actual script I made does not work.

1 Like

FIXED!
I did not put the last connect in the main script.
Oof moment.

you need to find the player first to change the scale what you would do is add

:Connect(function(hit)
if hit.Parent:FindFirstChild(“Humanoid”) then
debounce = false
local humanoid = hit.Parent:FindFirstChild(“Humanoid”)
Humanoid.HeadScale.Value + .5
end

sorry this took so long I wrote it on here

1 Like

it’s not a touch thing it’s if the player clicks the button all characters with testing value true should be big headed
but i am running into a problem.
it still increases head size, even with value false.

works the same with clickdetector the only thing thats different is you have to click

yes ik but why is the script not regarding the value?

it works fine if I spawn with the value false, but not if i change it mid game

Where do you add the testing Value? And is it defined as true or false?

Does it specify which line the error is on?

1 Like

it starts off defined as false. if I set to true at spawn it’s fine, and vice versa. the script just doesn’t detect changes after spawn.

I do not think it is an error, I think it just isn’t detecting changees.

Ok but where do you first add it from That’s what I wanna know, cause if you’re only adding it just once to the Character it won’t work again

I’m adding it on spawn. When the player spawns in they are given the value.

Hm, are you certain there aren’t any errors on your Output? Or could you add print statements?

i’ll test with print statements now. idk why it’s not working, it should check the value of the character on the click so.

okay so it gets past the wait for child, even on change, but when i change from true to false in game it does not get past the value check.

Question: Are you changing the value from the client side or the server side? I think that’s why it keeps happening from your perspective