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

how do i turn this into a killbrick?

basically the result i'm looking for is that the spawned car can kill the player when it gets touched

while true do
wait(20)
local car = Instance.new("Part", workspace)
local mesh = Instance.new("SpecialMesh", car)
mesh.MeshId = "rbxassetid://1490852609"
mesh.TextureId = "rbxassetid://1490852626"
mesh.Scale = Vector3.new(1.3,1.3,1.3)
car.Position = script.Parent.Position
car.Name = "car"
car.Anchored = false
car.Size = Vector3.new(9,6,20)
car.Velocity = Vector3.new(0,0,-150)
car.Material = Enum.Material.Ice
wait(4.5)
car:Destroy()
end

1 comment

0

Is the kill ment for the owner of the car or for everyone

1 answer

✓ Accepted answer

Hi. This should work:

while true do
wait(20)
local car = Instance.new("Part", workspace)
local mesh = Instance.new("SpecialMesh", car)
mesh.MeshId = "rbxassetid://1490852609"
mesh.TextureId = "rbxassetid://1490852626"
mesh.Scale = Vector3.new(1.3,1.3,1.3)
--car.Position = script.Parent.Position -- this is not going to work
car.Name = "car"
car.Anchored = false
car.Size = Vector3.new(9,6,20)
car.Velocity = Vector3.new(0,0,-150)
car.Material = Enum.Material.Ice
car.Touched:Connect(function(hit)
	 if game.Players:FindFirstChild(hit.Parent.Name) then
 	 hit.Parent.Humanoid.Health = 0
end
end)
wait(4.5)
car:Destroy()
end

6 comments

0

yes

0

post comments in comments pls

0

oops sorry

0

I edited it.

0

it works, thanks.

0

No problem!

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