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

How to make kill brick work while character is sitting?

I'm making a camping game and when they sit in the car and go through the teleport part, there is no error saying cant teleport in studio. I tried making a kill part so that when they touch it they die and then they will be collidable so they will be teleported but they dont die when they touch the kill brick. How do I fix this?

heres the code for the kill brick

script.Parent.Touched:Connect(function(hit)
	if hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
		hit.Parent.Humanoid.Health = 0
	end
end)

1 comment

0

Try Humanoid:TakeDamage(100)

2 answers

Well, you could probably accomplish this by going in if Humanoid.Sit == true, this might work.

So do this.

if hit.Parent.Humanoid.Sit == true then
	-- Insert some code here.
end

Or something of the similar. You may mess around with the statement a bit but should be on the right track to help you.'

Some other methods could be to disable to seat brick as well.

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