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

How To Script "Click To Type" SurfaceGUI?

So I want to make a message board in my game where you can click the part and type what you want on there. I want what the players typed on there to stay even after you close the game. Basically it needs to stay until edited again. I've looked up videos on YouTube, but I can't find what I'm looking for. These are the objects inserted so far:

  • Part
    • SurfaceGUI
      • Frame
        • TextButton
          • Script
        • TextLabel

The script says:

script.Parent.MouseButton1Click:Connect:function()

end))

May someone please tell me if I've done something wrong and how to fix it and also what I need to add?

2 comments

0

Search up datastore, or wait for someone to explain it for you. ^^ Or maybe watch this: https://www.youtube.com/watch?v=zBR0AmyF77M

0

Data stores aren't required in that case.

1 answer

###Instead of placing the SurfaceGui in workspace, place in the StarterGui, and set the Adornee to the part. And from a local script:

-- LocalScript

script.Parent.MouseButton1Click:Connect(function()
    -- code 
end)

###Edit: The text will not change until new text is inputted.

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