Studio says an argument is "function" incorrectly when inside a RenderStep

Reproduction Steps

  1. Run this:
local RunService = game:GetService("RunService")

local function Render(delta)
	local function test(arg)
		print(arg, typeof(arg))
		print(arg * 2)	
	end
	test("abc")
end

RunService:BindToRenderStep("Render", Enum.RenderPriority.Last.Value, Render)
--Render()
  1. Studio will show this error:

image

  1. Pause the mouse over the “arg” (line 4). It will show the content of the argument as a function:
    image

  2. Now comment line 11 (RunService) and uncomment line 12 (Render) and run again. It will show this error:
    image

  3. Repeat step 3 and it will show the correct argument value:
    image

Expected Behavior
Show the correct argument value

Actual Behavior
Studio shows the argument as function

Issue Area: Studio
Issue Type: Other
Impact: Moderate
Frequency: Constantly

2 Likes

Thank you for the detailed report!
I was able to reproduce the issue and have found the reason for this behavior in Studio debugger.

I have created an internal ticket to track and fix this issue.

5 Likes

A fix for this issue was implemented internally, it will be available in a future release.

5 Likes

This issue should now be resolved! If this issue is still occurring, please create a new topic for us to look into.