✓ Accepted answer
Okay. First, insert a RemoteEvent into ReplicatedStorage and name it ChangeText. Next, insert a ServerScript into ServerScriptService. Leave it blank for now. Now edit the LocalScript and change it to this:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
script.Parent.Parent.Parent.InfoGUI.InfoBoard.Aircraft.Aircrafttype.Text = script.Parent.Text
ReplicatedStorage:WaitForChild("ChangeText"):FireServer(script.Parent.Text, script.Parent.Parent.Parent.InfoGUI.InfoBoard.Aircraft.Aircrafttype)
This fires the RemoteEvent in ReplicatedStorage.
Now set the text of the ServerScript to this:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
ReplicatedStorage:WaitForChild("ChangeText").OnServerEvent:Connect(function(player, text, textToSet)
textToSet.Text = text
end)
This will set the text to the text of script.Parent.
Note: The LocalSscript will instantly run and fire the RemoteEvent. If you don't want this to happen, try putting the LocalScript code inside an event. For example, ClickDetetcor.MouseClick:Connect(function().
10 comments
Hmm. It seems we are going in the right direction but its not working. Whenever I type in something to the box, the Text property stays blank, but the info board is also blank.
Must be because of the client not effecting the server, therefore the script won't work. I think you have to use a RemoteEvent.
Im sorry, but I am not too familliar with RemoteEvents. Could you explain where to do it?
I will edit the post, hold on.
Okay, I have finished editing.
Thank you but it doesn't seem to work. I have read it and followed all of your steps.
Then I do not know what is happening, so I do not think I can fix it. Sorry.
Are there any errors happening?
No errors come up on the output.
Well, I don't know what's happening so I am afraid I cannot help you.