Either this is a bug or my bad code, but when trying to run :test() on the frame returned, it says it isn't a valid member of Frame. How do I fix this (note: it also doesn't appear in the code editor)
function funcs:createCanvas()
local canvas = Instance.new("Frame")
canvas.Size = UDim2.new(1,0,1,0)
canvas.AnchorPoint = Vector2.new(.5,.5)
canvas.Position = UDim2.new(.5,0,.5,0)
canvas.Parent = game.Players.LocalPlayer.PlayerGui.AppGui
function canvas:test()
print("hi")
end
return canvas
end
Full code just includes local funcs = {} and return funcs at the top and bottom