Ello! I'd just like to know if there was a way you could script custom properties for humanoids. For example, a Humanoid has 100 health, but how do you make it have 100 of something else?
Sorry , we cannot make scripts for you but we can give you ideas.
Try using "Graphical User Interfaces" : GUIs , NumberValue , a custom leaderboard if you can, become creative don't always rely on people.
Sorry if I sound rude.
Shakespeare said that : "We need to be cruel to be kind."
You can't change the properties that a Humanoid Object has. It is an uneditable userdata.
You can however, use a wrapper or higher object that a Humanoid is a part of.
A wrapper is just a table with the Humanoid inside it, that references the Humanoid as a backup.
local Humanoid = { new = function(Humanoid, Parent) return setmetatable({Humanoid or Instance.new("Humanoid", Parent)}, Humanoid) end; } Humanoid.__newindex = Humanoid function Humanoid:__index(i) local Humanoid = self.Humanoid local Variable = Humanoid[i] if type(Variable) == "function" then local func = Variable function Variable(...) -- We need to wrap functions to mimic ":" syntax return func(Humanoid, select(2, ...)) end -- Make it so the table can directly call the above function -- Instead of having to recreate the function each time rawset(self, i, Variable) end return Variable end
With this you could "add custom properties to humanoids", but you would have to reference these tables
I repeat, if you reference the Humanoid in the workspace, the above table will not be read
P.S. The best way to share tables is through ModuleScripts
More information on Object-Oriented Programming can be found here
local PlayerHumanoid = Humanoid.new(workspace.Player.Humanoid) PlayerHumanoid.Armor = 15
Good luck!