Any ideas? I tried with Events but seems that it does not work properly.
Edit: There is a model with an accessible Intvalue. I want to pass that value into a GUI (like a computer screen). The problem is, that there are multiple modelA that share the same name.
How do i access that "unique" Intvalue and screen it on the GUI?
I already know how to do a simple GUI but i lack the knowledge to transfer data between scripts. One script takes value from the source modelA and the other shows the GUI with updated data.
You cannot, however, if a script is in it, you can do script.Parent
. Otherwise, they will need to have different names. Hope this helps!
Edit:
To wait for a script to put an output, we can use LogService. Here is an example of a script sending info to another one. (Remote events would be better for this, but we can still use LogService.)
--First script wait(10) print(script:GetFullName()..' is ready!') --Let's assume this prints "game.Workspace.Script is ready!" --Second script: local ready = false game:GetService('LogService').MessageOut:Connect(function(message, msgtype) if msgtype == 0 or msgtype == 1 --[[The wiki is confusing about this, so I just included 0 and 1.]] then if message == 'game.Workspace.Script is ready!' then ready = true end end end) repeat wait() until ready == true --insert code here
So yes, you can wait until something appears in output.
You cannot have 2 models with the same names. You will have to rename all of your models so they don't share their names. Or you will have to make multiple scripts and that's not effecient at all.