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

This scripts works in Studio but not in public game?

Asked by 8 years ago

I don't know why, but it only works in studio. I defined all the variables beforehand.....what's wrong?

player=game.Players.LocalPlayer

function chat(chat)
_G.C6=_G.C5
_G.C5=_G.C4
_G.C4=_G.C3
_G.C3=_G.C2
_G.C2=_G.C1
_G.C1=player.Name..": "..chat

end

player.Chatted:connect(chat)

1 answer

Log in to vote
1
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
8 years ago

_G client sided is replicated to all localscripts within that client, not all the clients. You need to do this server-sided.

Ad

Answer this question