#uhh yes script problem yes

1 messages · Page 1 of 1 (latest)

lime thistle
#

why does it print, but not change the text?

''' local screengui = game.StarterGui:FindFirstChild("ScreenGui")
local label = screengui:FindFirstChild("TextLabel")

game.Players.PlayerAdded:Connect(function(player)
local localplayerID = player.UserId
label.Text = "Hello, " .. player.Name .. "!"
task.wait(3)
print("neajf")
label.Text = "..."
while true do
label.Text = "Waiting."
wait(0.5)
label.Text = "Waiting.."
wait(0.5)
label.Text = "Waiting..."
end

end)
'''

#

ty in advance if you can help

harsh thunder
#

ScreenGuis parent needs to be player.PlayerGui pretty sure

#

So you need to create a clone of the screen gui and make that clones parent player.PlayerGui

#

Also you should use task.wait() and your while true loop is going to change from "Waiting..." to "Waiting." immediately because there is no wait between the 2

lime thistle
#

wdym

harsh thunder
#

For what part?

#

What are you confused about

#

I meant

lime thistle
#

uhh all tbh

harsh thunder
#

Ok I'll explain dw 😀

#

so

lime thistle
harsh thunder
#

The ScreenGui is simply a template in essence

#

Like it's not that simple but let's just call it that

#

And so you need to give each player their own ScreenGui

lime thistle
#

yes

harsh thunder
#

'PlayerGui' is each client's own Gui

lime thistle
#

ohh

#

yes i see

harsh thunder
#

so for example;

ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui```
wide matrixBOT
#

studio** You are now Level 6! **studio

lime thistle
#

yes

harsh thunder
#

And for the while true do loop

#
local i = 1

task.spawn(function()
    while true do
        label.Text = texts[i]
        i = i % #texts + 1
        task.wait(0.5)
    end
end)```

I'd do something more like this
#

task.wait is like the modern wait()

lime thistle
#

alr ty

harsh thunder
#

np 😊

#

good luck

lime thistle
#

yes u too

harsh thunder
#

lol

lime thistle
#

wait uh

lime thistle
#

uhm

#

@harsh thunder

harsh thunder
#

Is your text label inside the screengui?

lime thistle
#

yes

harsh thunder
#

When you clone something, it brings anything inside it too

lime thistle
#

oo ok so im fine right wait look

harsh thunder
#

k

lime thistle
#

local ScreenGui = script.Parent:Clone()
ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui

game.Players.PlayerAdded:Connect(function(player)
local localplayerID = player.UserId
label.Text = "Hello, " .. player.Name .. "!"
task.wait(3)
print("neajf")
label.Text = "..."
local texts = {"Waiting.", "Waiting..", "Waiting..."}
local i = 1

task.spawn(function()
    while true do
        label.Text = texts[i]
        i = i % #texts + 1
        task.wait(0.5)
    end
end)
#

uh ts wont work but like uh

#

i need to do sum but yh

harsh thunder
#

Put the screengui clone thing inside the function

lime thistle
#

alr ty and uh the txtlabel is need to be nameb "label"

#

sorry my english is not the englishing

#

uhm

strange walrus
lime thistle
#

i think you understood

harsh thunder
#

well u gotta define what label is

lime thistle
#

like uh reference it

harsh thunder
#

yh

#

like local label = ScreenGui.TextLabel or whatever

#

And put that inside function too

lime thistle
#

:FindFirstChild

#

yea

#

ok ty❤️‍🩹

harsh thunder
#

Ping me if problems xd

lime thistle
#

lol yeh

#

oh my lord

wide matrixBOT
#

studio** You are now Level 5! **studio

lime thistle
#

my dumbass didnt use a local script

#

🐇

harsh thunder
#

. . .

lime thistle
#

😭 pray for me

worthy acorn
#

You dont have to clone it twice

lime thistle
#

idk but its soolved

#

i fort to put the tag sorru

#

oml

harsh thunder
lime thistle
#

forgot*

#

huh

harsh thunder
lime thistle
#

wdym shusck

harsh thunder
#

😠

#

js do it!

lime thistle
#

can i just screenshare`

#

mute tho

harsh thunder
#

No like just follow my instructions

lime thistle
#

ok

harsh thunder
#

I don't need to see

#

ahahahaha

lime thistle
#

👍 😔

harsh thunder
#

I'm sorry I lied to you

worthy acorn
# harsh thunder oh shucks

As long as its under startergui it will automatically clone for each player. So unless its not in startergui then u might wanna clone it

harsh thunder
#

No kill me please

lime thistle
#

for me its wokring

harsh thunder
harsh thunder
lime thistle
#

😫

#

ok fine

strange walrus
#

Script parent.oa re nt.

#

Panre.t

harsh thunder
# lime thistle 😫

in ur script change local screengui to

local ScreenGui = game:GetService("Players).LocalPlayer.PlayerGui.ScreenGui

harsh thunder
#

Make sure if u make more ScreenGuis you change their names

#

As it will cause problems

#

If not

lime thistle
#

alr

#

no cuz it was just for training

#

im not making a game

harsh thunder
#

training firer

lime thistle
#

🎿

harsh thunder
lime thistle
#

alr

#

dude``

#

whatchu know about ethiopian toilets? do ethiopian toilets = mc squared?

#

ngl i might have multiple mental disorders

harsh thunder
#

fact

#

maybe scripting is your escape

#

your anti kryptonite

lime thistle
#

anyways ty for the help and goodnight

#

maybe

#

i need more floppa plushies in my bed

#

ok byee