Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-3-5-haiku-20241022· AnthropicHugging Face LMArena Human Preference 140K

Generate a script in Roblox Studio that kills me when I touch a part.

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Geminigemini-2.5-pro-preview-05-06’s answer.
  1. User

    Generate a script in Roblox Studio that kills me when I touch a part.

  2. Claude Assistant

    Here's a simple Lua script for Roblox Studio that will cause the player's character to die when touching a specific part:

    local killPart = script.Parent -- Assumes the script is placed inside the part that will cause death
    
    function onTouched(otherPart)
        local character = otherPart.Parent
        local humanoid = character:FindFirstChildOfClass("Humanoid")
        
        if humanoid then
            humanoid.Health = 0 -- Instantly kills the character
        end
    end
    
    killPart.Touched:Connect(onTouched)
    

    To use this script:

    1. In Roblox Studio, create a part you want to use as the "kill part"
    2. Insert a Script inside that part
    3. Copy and paste the above code into the script

    The script will make the part instantly kill any character that touches it by setting the Humanoid's health to 0.

    A few notes:

    • Place the script directly inside the part you want to act as a death trigger
    • This works for both players and NPCs with Humanoid components
    • The character will die instantly upon touching the part

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.