Skip to content

Conversation

@sammygrey
Copy link
Contributor

Changes

The documentation can be somewhat confusing when trying to learn how to correctly implement pcalls as pointed out by @junveld in this forum post. I have added a small piece of example code for how to use pcalls to do function calls that even when returning an error, will allow the rest of the script to continue as normal.

Checks

By submitting your pull request for review, you agree to the following:

  • This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses.
  • I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses.
  • To the best of my knowledge, all proposed changes are accurate.

sammygrey added 2 commits May 25, 2025 13:17
Added an example function for usage of pcall()
@sammygrey sammygrey requested a review from a team as a code owner May 25, 2025 17:23
@github-actions github-actions bot added the engine reference Changes the Engine API Reference documentation label May 25, 2025
added the suggested example code by @junveld

This problem was brought to my attention by them and I believe their example code works for the suggested usecase.
@IgnisRBX
Copy link
Contributor

IgnisRBX commented Jun 2, 2025

@sammygrey
Thanks for the contribution! I just changed the pcall() param name from response to errorMessage to match what's generally used throughout our docs.

@IgnisRBX IgnisRBX merged commit fb52a5c into Roblox:main Jun 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine reference Changes the Engine API Reference documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants