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

Split Second Dilemma: How to prevent 'Label' from being shown for a split second?

Asked by 6 years ago

This question has been solved by the original poster.

This script allows players to rename.

01local ReplicatedStorage = game:GetService("ReplicatedStorage")
02 
03local createPartEvent = ReplicatedStorage:WaitForChild("CreatePartEvent")
04 
05   
06 
07function name(isEnterPushed,placeholder)
08 
09if isEnterPushed then
10 
11YourName = script.Parent.TextBox.Text
12 
13createPartEvent:FireServer(YourName)
14 
15elseif isEnterPushed == nil then
16 
17YourName = game.Players.LocalPlayer.Name
18 
19createPartEvent:FireServer(YourName)
20 
21end
22 
23end
24 
25script.Parent.TextBox.FocusLost:connect(name)
26 
27script.Parent.TextButton.MouseButton1Down:connect(name)

The script works just as planned, my only concern is that for a brief moment when applied, the text says ‘Label’ and quickly turns into the given player input.
Is there a way to remove that? To go straight into what the player had assigned the text to be?

0
is withouth any scripts, is the ui's text empty? starmaq 1290 — 6y
0
Yeah, that's what it was, silly me. Thanks! sactman64 7 — 6y
0
np! starmaq 1290 — 6y
0
can you please upvote one of my comments im on a grind starmaq 1290 — 6y
0
sorry for begging starmaq 1290 — 6y

Answer this question