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

How Do i make a script when a player says a word it says Hello etc to the player on the screen?

Asked by 6 years ago

So Far I Have:

game.Players.PlayerChatted ("Hello")

wait (1)

game.StarterGui.ScreenGui.Frame.Text = "Hello" wait(0.1) game.Players.LocalPlayer.DisplayName

But Nothing Happens

--JamiethegreatQ777

1 answer

Log in to vote
0
Answered by
Rare_tendo 3000 Moderation Voter Community Moderator
6 years ago

What the client sees on their screen is found in PlayerGui. The descendants of StarterGui are replicated to PlayerGui.

local player = game.Players.LocalPlayer
local pgui = player:WaitForChild('PlayerGui')

wait()

player.Chatted:Connect(function(msg)
        pgui.ScreenGui.Frame.TextLabel.Text = 'Hello '.. player.Name
end)
Ad

Answer this question