This is my first post here so sorry if things aren’t clear.
I have had this problem for a while and I was never sure how to bring text from a local player’s Gui onto an object in the server since there is no ‘Local Player’ in regular scripts. This would have been easy if it had been entirely client sided but I want these changes to be visible for everyone. I have already looked up and eventually found one that did work, however it doesn’t work server sided for some reason.
Here is that code here if that helps:
Local Script Inside Textbox
script.Parent.Changed:Connect(function()
game.ReplicatedStorage.RemoteEvent:FireServer(script.Parent.Text)
end)
Regular Script inside of workspace
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(plr, text)
game.Workspace.Part.SurfaceGui.TextLabel.Text = text
end)
Yes, I do have a Remote Event inside of Replicated Storage.
How do I solve this?
1 Like
What happens right now with this line of code… Anything in the output?
If it is a remote function, you are formatting it incorrectly. I assume you mean remote event, But I wanna make sure.
I’ve checked and there is nothing in the output. Also yes, I meant a remote event.
I was curious and tried it… It seems to work on server side… Can you maybe define what you want a bit? or post a video?
Well it seems to be working now. It may have been that I was trying different things like having it print in the dev console. Not sure what I ended up doing that caused it to start working. But thanks for trying to help!
I do see a possibly issue that can be a issue if you add more remote events etc!. I would rename your objects and change them in the scripts so that the script doesn’t get confused on another part. Now for me, I was using a normal baseplate, and so that is why I could not have any issue. But I am glad it is working!
1 Like