#Is there any way to make this seem less "laggy"?

1 messages · Page 1 of 1 (latest)

deft gale
#

Not sure if it's just me, but in between the user typing and it appearing, it seems quite slow. Here's my code:

Client:

script.Parent:GetPropertyChangedSignal("Text"):Connect(function()
    local text = script.Parent.Text
    game:GetService("ReplicatedStorage"):WaitForChild("ScreenUpdateEvent"):FireServer(text)
end)

Server:

local event = game.ReplicatedStorage:WaitForChild("ScreenUpdateEvent")
local TextService = game:GetService("TextService")
local box = game.Workspace["building stuff"].ToUpdate.SurfaceGui.TextLabel

event.OnServerEvent:Connect(function(plr, msg)
    local filtered = TextService:FilterStringAsync(msg, plr.UserId):GetNonChatStringForBroadcastAsync()
    box.Text = filtered
end)
glacial steppe
#

hmm

#

I think that's just delay

deft gale
#

yeah but ive seen other games not have this

glacial steppe
#

but maybe there are other ways to fix it

deft gale
#

we played one

glacial steppe
#

i mean

deft gale
#

and it was like

#

instant

glacial steppe
#

other ways to do this

deft gale
#

hmm yeah

glacial steppe
deft gale
#

cause we have to filter it

#

cause i dont wanna get banned

hallow prairie
#

if you want it to be instant you must sync it for each client

#

for example client types and it syncs to the client typing then the server sends it out to everyone after passing the filter

#

if you want it to be instant for the client the gui has to sync with the client then replicate it to the server idk if im explaining it right

gusty orchid
#

@deft gale

#

im sorry

#

it just appeared

deft gale
#

what did?

#

Without filtering it's fine

gusty orchid
#

?

deft gale
#

What appeared?

#

It has to be filtered though.

#

I am asking here because I want help with filtering it

#

I've seen it faster in spelling games, though

#

Like, instant fast

#

I can try it

#

It doesn't exist?

#

Like I said, spelling games

#

Go to any mainstream spelling game

#

It's defo not whitelisting

#

Yeah, 100%

#

I've typed the most random words before

#

damn

#

woah i think he just got banned

glacial mirage