i see, thank you for the clarification I appreciate it.
The 200,000 character removal would be amazing for many plugin-based workflows.
I tried testing this by creating a plugin with the following code:
local ScriptEditorService = game:GetService("ScriptEditorService")
local ServerScriptService = game:GetService("ServerScriptService")
local script = Instance.new("Script")
script.Name = "Test Script"
script.Parent = ServerScriptService
ScriptEditorService:UpdateSourceAsync(script, function()
return string.rep("a", 300000)
end)
ScriptEditorService:OpenScriptDocumentAsync(script)
I get the error “This API is unavailable” - I’m on 592 but it seems like it hasn’t rolled out to me yet. Maybe someone will be in a test group or an earlier config rollout shard and can test this successfully right now.
Overall, fantastic work Roblox team! This is the most exciting update for me in a long while. I particularly like
-
Fixes incorrect path returned by pathfinding with few waypoints having Y=0
. I hope this is the issue where on terrain pathfinding waypoints would appear underground. This was moderately annoying and required raycasting pathfinding waypoints to the terrain ground. -
Fixes an issue where some text in the microprofiler displays incorrectly.
- ran into this a bunch which gets confusing as the labels are wrong or duplicated on some intervals. -
Fixes "cannot resume dead coroutine" error coming from cancelled threads that were suspended on Wait/WaitForChild call.
- yay, no more spurious errors from this!
FFlagUpdateSourceAsync
This may be unrelated question, but does updating the source to a function run the script? or does it set the function contents to thread contents.
It’s not that well documented, but I think the return value of the callback should be a string, and that is the contents of the script.
then that kind of defeats the purpose imo, I was hoping for something similar to task.spawn
, which creates a thread from a function. only difference being here that it creates a LuaSourceContainer
I haven’t got around to testing it just yet but I’m pretty sure its similar behaviour to DataStore:UpdateAsync
func: (oldSrc: string) -> string?
Yes, it’s like DataStore UpdateAsync.
It provides a way to update the source of a script which is guaranteed to not conflict with other edits being applied by people typing into the script locally or other edits coming it from across the network in Team Create and other scenarios. The idea is that most scripts aren’t constantly being edited, so even if it fails the first or second run it’s likely to succeed shortly thereafter.
For example, it makes it trivial (or at least much easier) to correctly write a custom find-and-replace-in-all-scripts implementation.
Ah that makes sense. Nice job on adding team create compatibility. But will we ever be able to make the script source a function? It’s really annoying and takes so much effort to make a table in script thru a plugin.
Now, we need a reconnect function to go with that lol…
Yeah, it’s quite sad that the connection signal is just wasted after you use it. You can’t set Connected
to true either.
Does connection:Destroy actual destroy the connection or is it the exact same as a disconnect?
Could just destroy the connect then remake it when you want to, maybe I don’t know.
You cannot destroy a connection.
Isn’t that what the connection:Destory() part thing is for in the release notes?
Connections don’t have a Destroy
method. It must be a typo.
Wonder what Roblox meant then.
I don’t think you’ve seen what weird “updates” are shown sometimes.
You don’t need a method to reconnect an event. Just store the function as a local and call :Connect again.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.