Hello, i am very new to coding and very new to scripting on Roblox. So, i want to be able to press a button and have that output a number 1, in another script i want it to be able to read that number and compare it to 1.
Try either a RemoteEvent or a BindableEvent. Remote events let you send variables from the client to the server / the server to the client, while BindableEvents let you send variables from server script to server script / client script to client script.
If you did use int values, then there is a chance u didnt use them right, that can be if the script runs immideatly or if script 1 is a local script. For this to work in a local script maybe use remote events like the guy above me told you or use the .Changed event in the second script. This will fire every time one of the int values property changed. Do like
local numbera = shared.a -- assuming this is a int value
numbera.Changed:Connect(function()
if numbera.Value == 1 then
print(numbera.Value)
end
end