Typos & Minor Edits Mega-thread [Closed]

Not sure if this has already been reported, but:

On this page, GamepadConnected, the following code:

local userInputService = game:GetService("UserInputService")
 
local function GamepadConnected(gamepad)
	print("Player has plugged controller: " .. tostring(gamepad))
end)
 
userInputService.GamepadConnected:Connect(GamepadDisconnected) 
-- shouldn't this be GamepadConnected?

LocalScripts don’t run in the workspace unless they are a descendant of the player’s character. So someone can’t just slap this code into a localscript and put the localscript inside the door and expect it to work.

1 Like

Broken link: " See Using Player Spawns for details."

Should go to Implementing Teams | Documentation - Roblox Creator Hub

image
loadstring says it returns a Variant even though it always returns a callable function

I just found an error in the UserInputService.TouchEnabled page.

It says:

there’s no link, just ‘[here][1]’. I’m not sure if the page was removed

https://developer.roblox.com/en-us/api-reference/property/UserInputService/TouchEnabled

No, that is accurate. If the string has a syntax error in it loadstring returns nil + error message.

At the end of the page, the last example code uses a deprecated Roblox Global.

local part = Workspace:WaitForChild("Part")
print(part.Name .. " has been added to the Workspace")

local part = Workspace:WaitForChild("Part")

Workspace is deprecated, workspace must be used instead.

https://developer.roblox.com/en-us/api-reference/lua-docs/Roblox-Globals

As far as I know, elapsedTime() is now deprecated and according to Studio ScriptAnalysis, os.clock() must be used instead.

elapsedTime() can still be found at Roblox Globals page & there isn’t any advice saying that It is deprecated.


This should actually say 4,194,301, not 4,000,000, as this is how much 4MiB is in bytes. (yes i care about ~200 extra kb)

Page: Data Stores

2 Likes

On Tool.Enabled, “When set to true, the tool can use the tool.” should be “When set to true, the player can use the tool.”
image

https://developer.roblox.com/en-us/api-reference/function/AssetService/GetGamePlacesAsync

change AssetService:GetGamePlacesAsync1 to AssetService:GetGamePlacesAsync

https://developer.roblox.com/en-us/api-reference/function/Player/Kick

image
image

These images should be changed to display the new kick & console theme.

https://developer.roblox.com/en-us/api-reference/class/SelectionBox

The API reference for the SelectionBox object is badly written and contains a misspelling, “SelectioBoxes” as well as a nonsensical sentence “An adornee what it shows up on”.

The CreateToolbar page misspells toolbar as tooblar.

2 Likes

oh god here comes a technical thread

This page has a tip where it says ‘remove all references’

The reasoning it gives, is, uh, alright I guess? But you should probably state that if the object is referenced in a variable, it’s never removed from memory, not just This prevents your code from accessing anything to do with the object.

local Part = {
	[workspace.Baseplate] = true
}

game.Workspace.Baseplate:Destroy()
wait(5)
for i in pairs(Part) do
	print(i.Name)
end
> Baseplate

This is just how Lua’s GC will work, if it finds a reference to anything, whether it’s a userdata or just an every day variable. It will not remove it from memory if it can find a reference to it.

I feel this is a pretty significant fact about Lua to just completely gloss over

:GetRoleInGroup() and :GetRankInGroup() has a typo pasted like this:

##Note

Screenshots:

Sources:

https://developer.roblox.com/en-us/api-reference/function/Player/GetRankInGroup

https://developer.roblox.com/en-us/api-reference/function/Player/GetRoleInGroup

Modifying the code within a script modifies the source code executes executed when the script runs.

1 Like

Not updated code in api reference. Link:SocialService
Need change SocialService.CanSendGameInvite to SocialService.CanSendGameInviteAsync

I found typo in api reference documentation. Link: https://developer.roblox.com/en-us/api-reference/function/InsertService/LoadAsset
typo: “workpsace”
image

Found a typo in the SelectionBox article
image
rendering 6 as a 4th argument