What could I do to use a parameter with a context action service function

I’m trying to bind an action when the mouse goes over an “interactable” object. For the function to work I need an object parameter (the object itself)

My problem is I can’t find a way to do so

--The function
local function usecurrentobject(object)
-- Code
end

--Binding
local object = mouse.Target.Parent
if currentlydisplaying == false then
	actiongui.Container.Visible = true
	objectipgui.Text = object.Interact.ObjectTip.Value
	objectnamegui.Text = object.Interact.ObjectName.Value
	cas:BindAction("Action", usecurrentobject, false, Enum.KeyCode.F) --How can I set the object here?
end

I really can’t find a way around it. Help is greatly appreciated! :slight_smile:

I found a decent solution to my problem. I declared object outside the function where I bind it and set it to the selected object