Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What are these parameters, is there a data store of them?

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)

1 comment

0

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.

1 answer

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.

1 comment

0

OK let me rephrase this because I didn't word it too well. I understand it's a function but I'm wondering where I can find that function and other variable functions.

This discussion is preserved as it was. New answers, comments, and votes are closed.