Spinning Trap
Spinning Trap Part
Spinning Trap Part
Code one part
Code one part
Duplicate and Group
Duplicate and Group
What it should end up as
What it should end up as
Start by adding the scripts below to a single part. Then when you duplicate that part it will also copy the scripts. When you group the parts it will put them inside a model.
Start by adding the scripts below to a single part. Then when you duplicate that part it will also copy the scripts. When you group the parts it will put them inside a model.
Movement Script
Movement Script
local part = script.Parent
while true do
part.Orientation = part.Orientation + Vector3.new(0,5,0)
wait(0.01)
end
Die on Touch Script
Die on Touch Script
local part = script.Parent
local function kill(bodyPart)
local person = bodyPart.Parent
local humanoid = person:FindFirstChildWhichIsA('Humanoid')
if humanoid then
humanoid.Health = 0
end
end
part.Touched:Connect(kill)