So this script works perfectly fine on studio, but not online/server mode. Code:

local ssc=game.ServerStorage.Chat
local sp=script.Parent
local l1=ssc.Line1
local cl1=sp:FindFirstChild("1"):FindFirstChild("MessageContainer")

while wait() do
cl1:FindFirstChild("Message").Position = UDim2.new(0, cl1:FindFirstChild("Sender").TextBounds.X, 0,0)
end

What the code is supposed to do:

Sender: Message

Message is supposed to be at the above position (using textbounds). I do not understand why this does not work on server mode, but works on studio. Help is appreciated. Thanks!

1 comment

1

TextBounds only works in the client. It works in test mode because everything runs on the client when solo testing. It should have some info about that on it's wiki article.