RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"how do u make a part kill a player"
To make a part kill a player when touched, you can use the following script. Place this script inside the part you want to be deadly. ```lua local part = script.Parent local function onTouched(hit) local character = hit.Parent local humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid.Health = 0 end end part.Touched:Connect(onTouched) ``` This script listens for the "Touched" event of the part and checks if the object touching it has a Humanoid. If it does, the script sets the Humanoid's Health to 0, effectively killing the player.