Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

the player can edit the message, and this was not supposed to happen.?

Asked by
lytew 99
4 years ago

hello. So, I created a script that causes a message to appear on the screen when a player touches a cloud. In the cloud there are 7 parts so I activated each one to the function The problem is that if a player clicks on the message, he can edit it (the text is in a TextBox) I could put it in a textLabel calmly, but the message is very large and the Text Label does not have the MultLine option for that i know


parte1 = script.Parent.Cloud1 parte2 = script.Parent.Cloud2 parte3 = script.Parent.Cloud3 parte4 = script.Parent.Cloud4 parte5 = script.Parent.Cloud5 parte6 = script.Parent.Cloud6 parte7 = script.Parent.Cloud7 texto = game.StarterGui.ScreenGui.TextBox function toque() while true do wait(0.1) texto.TextTransparency = 0 texto.BackgroundTransparency = 0 wait(7.35) texto.TextTransparency = 1 texto.BackgroundTransparency = 1 wait(0.4) break end end parte1.Touched:Connect(toque) parte2.Touched:Connect(toque) parte3.Touched:Connect(toque) parte4.Touched:Connect(toque) parte5.Touched:Connect(toque) parte6.Touched:Connect(toque) parte7.Touched:Connect(toque)
0
Try asking this question on the ribkix developer forum, it might get answered quicker there Lord_WitherAlt 206 — 4y
0
ok,thnaks man lytew 99 — 4y
0
Try using a TextButton instead of a textbox. A textbutton's text can only be changed through a script or so, while a player can type in a Textbox Dylan011444 59 — 4y
0
Try using a TextButton instead of a textbox. A textbutton's text can only be changed through a script or so, while a player can type in a Textbox Dylan011444 59 — 4y

1 answer

Log in to vote
0
Answered by
royaltoe 5144 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

The reason people can edit the text is because it is a textbox. Textboxs allow people to type into them. You should be using a textlabel instead.

Can you show me what you want the text in the textbox to look like and how it looks like inside a text label?

EDIT:

To have multiple lines on a text label, put a script directly inside of your gui: \n lets the game know you want to create a new line

local textLabel = script.Parent.TextLabel --change this to be the location of your text label

textLabel.Text = "and\nwe have multiple\nlines"

--[[

text will show as:

        and
    we have multiple 
        lines

if you want it to display from the right, set the label's textxallignment to be right. 
]]
0
pls reply royaltoe 5144 — 4y
0
the text in the textBox has 5 lines, but if I put it in the textLabel it is just straight because the textlabel does not have a MultLine function (to have more than one line to write) lytew 99 — 4y
0
i'll check that out in a few minutes. im pretty sure you can avoid this by adding a \n in the string to indicate a new line it would be helpful having pictures like i said. if you want to talk on discord for quicker communication, hmu @ Lucy#0003  royaltoe 5144 — 4y
0
Yeah, \n does the trick. I'll edit my post to reflect that royaltoe 5144 — 4y
Ad

Answer this question