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

IntValue.Changed not working through server script?

This is not working and someone please help!

while wait() do
	local test1 = script.Parent
	test1.Parent.test2.Value.Changed:connect(function(c)
		print(c)
	end)
end

1 comment

0

If you're trying to change the IntValue from a local script, changed won't fire because clients (Localscripts) can't actually change anything on the server for security reasons.

1 answer

You don't need make a loop to check if changed.

And in line 3 you using IntValue.Value.Changed. But it must be IntValue.Changed like this:

  local test1 = script.Parent
  test1.Parent.test2.Changed:connect(function()
    --Code here
  end)

And i dont know if you test2 is inside of test1. if test2 is inside of test1 then

  local test1 = script.Parent
  test1.test2.Changed:connect(function()
    --Code here
  end)

Or if your test2 isn't inside test1

  local test1 = script.Parent
  test1.Parent.test2.Changed:connect(function()
    --Code here
  end)

1 comment

0

I tried the code and it does not work ;(

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