local Brick = script.Parent
local function PlayerTouched(Part)
local Parent = Part.Parent
if game.Players:GetPlayerFromCharacter(Parent) then
Parent.Humanoid.Health = 0
THAT IS SCRIPT
So what is the meaning of this : --Variables–
local Brick = script.Parent I’m vary new to this pls don’t call me stupid
That script sets a player’s health to zero when they touch a part.
The script kills the player who touched the part.
What is local Brick = script.Parent mean
Those are variables. It’s basically setting a word, in that case “Brick” to a value, it can be a number, string (text), or even an object. In that case, it’s setting “Brick” to the parent of the script, so for the rest of that script if you say “Brick” like for example:
you’ll get the name of the scripts parent.
Alright okay thank you @Pr0pelled.