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

how can I make an acid rain when touched the rain we reduce 30 damage by adding my code ?


while true do
	wait()
	local random1 = math.random(122, 154)
	local random2 = math.random(-176, -122)
	local part = Instance.new("Part", game.Workspace)
	part.Anchored = false
	part.Transparency = 0.6
	part.Size = Vector3.new(0.5, 2, 0.5)
	part.Position = Vector3.new(random1, 59.5, random2)
	part.CanCollide = false
	
end

1 answer

✓ Accepted answer
Part.Touched:Connect(function(Touch)
	
	if Touch and Touch.Parent then
		
		if Touch.Parent:FindFirstChild("Humanoid") then
			
			local Humanoid = Touch.Parent.Humanoid
			
			Humanoid:TakeDamage(0) --Change 0 to your damage.
		end
	end
end)

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