So basically I'm trying to make a script for VSB or Void Script Builder and I'm trying to figure out how to do it
The script is supposed to spawn a part with a script inside it to kill any player it touched.
I'm going to put this into separate scripts
Script 1: Trap = Instance.new("Part", workspace)
Script 2: Trap.Name = "KillPart"
Script 3: https://paste.ee/r/VPcde
Script 3 was a link cause inline code never worked with it.
You don't need separate scripts to do what you want. You can just do it in one script. You also can just parent the script itself to the part with one line of code.
Here's what I did to your scripts :
local KillPart = Instance.new('Part') -- Combined script 1 into 3. Also parent it in a seperate line of code KillPart.Position = Vector3.new(0, 0, 0) -- Creating part puts it in the center of the place. Change the values if you want it somewhere else. KillPart.Parent = workspace KillPart.Name = "Trap" -- Combined script 2 into 3 script.Parent = KillPart -- Parents script into part local function onPartTouch(otherPart) local partParent = otherPart.Parent local humanoid = partParent:FindFirstChildWhichIsA("Humanoid") if humanoid then -- Removed () as they are not neccessary humanoid.Health = 0 end end KillPart.Touched:Connect(onPartTouch)
As you can see, I created the part and parented the script into it. I also combined all your scripts into one script. Note that your part will spawn at the center of the place unless you change its coordinates.
Hoped this helped!