Hi, so im currently making a “base” for a game, but are running into some problems…
I want to somehow extend a Player instance, and add custom methods inside it.
But indexing it through metadata will just destroy functions like WaitForChild and FindFirstChild. And i can’t find any posts about how to fix it.
local plr = setmetatable({}, {__index = Player})
function plr:Test()
plr:WaitForChild("PlayerGui") -- Will return error
end
I get this error: Expected ':' not '.' calling member function WaitForChild
And i’ve tried using: plr.WaitForChild(plr, ...)
Ain’t what im saying. That using modulescripts on the client can work, but i would need to use external functions for all on the server, if it ain’t possible to create custom methods inside a Player