Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

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)
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. ZenTGE 4 — 5y

1 answer

Log in to vote
0
Answered by
ZenTGE 4
5 years ago

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.

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. Beastlance 22 — 5y
Ad

Answer this question