I’ve set up a custom prompt system, and I’m wondering which method is better in terms of performance or practicality.
One approach uses RenderStepped to check every frame for each object in a hardcoded directory:
RunService.RenderStepped:Connect(function()
local closestEntry, _ = getClosestPrompt()
if closestEntry then
interactFrame.Visible = true
textInfo.Text = closestEntry.Action or "Placeholder"
else
interactFrame.Visible = false
end
end)
The other approach checks whether a part is touched, like detecting if the player is within a prompt's max reach (e.g., the red circle).
I have no idea how the framerate would be affected if there are around 1,000 objects that require custom prompts — such as NPCs, harvestable spots, etc.
** You are now Level 11! **