So, while I was taking a wiki lesson it instructed me to use the parameter "otherPart". I understand what this does but for future reference I'd like to be able to find my own parameters. Is there any place that I can find the parameters like this? Like a data store or something? Thank you!
local healthPack = script.Parent local healAmount = 30 local function handleTouch(otherPart) local character = otherPart.Parent local humanoid = character:FindFirstChild(**Humanoid**) if humanoid then local currentHealth = humanoid.Health local newHealth = currentHealth + healAmount humanoid.Health = newHealth end end healthPack.Touched:connect(handleTouch)
What kind of data are you trying to store? In the simplest of form, datastore stores a value even when a server has been shut down. "otherPart" I am pretty sure is just an example. As script.Parent.Touched:Connect(function(otherPart() would make a function. You could call it whatever you want. otherPart is just a name of a function, and in this case, a variable.